Monday, December 16, 2013

Running perl scripts as cron job

 
              When we run perl scripts as cron job we should use the full paths of the commands inside the script.  Suppose if we are using the command  "top" inside the perl script. We need to use full path. For example: /usr/local/bin/top should be used for top command in the below server.

-----
# which top
/usr/local/bin/top
-----

Option to sort  processes in the order of memory usage

-----
/usr/local/bin/top -b -o res
-----

 Option to sort  processes in the order of CPU usage

-----
 /usr/local/bin/top -b -o cpu
-----

No comments:

Post a Comment