/app/startMonitor.py

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read this

/app/startMonitor.py

Postby mosehgunathas on Mon Mar 11, 2013 4:35 pm

hi

can some one answer this question please,

1.You need to configure a Linux system to run the command /app/startMonitor.py as root every weekday at 6AM. What file do you edit, and what line would accomplish this requirement?

2. An application is required to start during the system boot, and to stop whenever the system is coming down. Describe the steps taken, and the files created to accomplish this.


3. What is the difference between the RHEL commands named rpm and the one named yum?



4. How would you start the command /app/startMonitor.py and redirect STDOUT to /app/log/monitor.log, but redirect STDERR to /app/log/monitor.err



5. How would you output the content of the Linux passwd file, ordered by the primary group ID of listed users



6. What configuration files do you need to edit/modify in order to make a Linux system authenticate users from a local network LDAP service
mosehgunathas
Level 1
Level 1
 
Posts: 2
Joined: Mon Mar 11, 2013 4:31 pm

Linux Mint is funded by ads and donations.
 

Re: /app/startMonitor.py

Postby semicolon on Mon Mar 11, 2013 5:36 pm

That's a lot of questions in one, here we go:

1. You could use crontab for that (a short explanation can be found at http://forums.linuxmint.com/viewtopic.php?f=42&t=107884)

To run commands as root, I believe, you need to open crontab with sudo, so
Code: Select all
sudo crontab -e

Then add a line to the file that opens and save. To run a command every day at 6AM, add:
Code: Select all
0 6 * * * /usr/bin/somedirectory/somecommand

2. To run a program at startup you can add:
Code: Select all
@reboot /usr/bin/somedirectory/somecommand

3. Yum is a package manager which automatically resolves dependencies and so, whereas rpm is a more basic tool to install .rpm packages.

4. To redirect stdout and stderr:
Code: Select all
python /app/startMonitor.py 1>/app/log/monitor.log 2>/app/log/monitor.err

5. To output the passwd file sorted by primary group ID:
Code: Select all
cat /etc/passwd | sort --field-separator=: --key=4,4 --numeric-sort

6. I have absolutely no idea :wink:
Someone else may help you with that.
semicolon
Level 2
Level 2
 
Posts: 56
Joined: Sat Mar 09, 2013 7:26 am
Location: Netherlands

Re: /app/startMonitor.py

Postby mosehgunathas on Tue Mar 12, 2013 2:26 pm

thanks a lot, God bless you
mosehgunathas
Level 1
Level 1
 
Posts: 2
Joined: Mon Mar 11, 2013 4:31 pm


Return to Other topics

Who is online

Users browsing this forum: No registered users and 4 guests