Hi out there!
I'm working in redhat and trying to automate a command to give me "top" output to a file.
When i just go ahead and type
Type >top -n 3 >> /home/caligal/dailytoplog.out
It gives me just what i want 3 iterations of readable output from top in a file.
When i create a script with the exact same command in it to be automated with a cron (later), the output in the file is just a jumbled mess of lines running together. I've even tried the -b option to make a batch file for ouput to a file and i get the same result when i run the script.
Can somebody tell me what is wrong ?? the very same command works if i run it manually???
I need this for monitoring and testing software that is running on our servers that may be a potential problem and i can't sit all day running these every 5 minutes on all our web servers manually.
Any assistance would be more than appreciated. . . time is of the escence.
Thanx to all in advance. caligal