![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to parse through a file and based on condition form another output file | sivasu.india | UNIX for Advanced & Expert Users | 6 | 02-28-2008 04:59 AM |
| Creation of output file from list of file | ganapati | Shell Programming and Scripting | 7 | 01-18-2008 07:55 PM |
| compare file size from a output file from a script | moustik | Shell Programming and Scripting | 7 | 11-07-2007 10:17 AM |
| HP-UX and 'top' | deckard | HP-UX | 8 | 07-21-2005 05:04 PM |
| Dual CPU's and 'top' | hcclnoodles | UNIX for Dummies Questions & Answers | 3 | 07-17-2003 01:15 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
catpure output of 'top' in a file
Code:
#!/bin/sh echo `date +%F:%T` >> top.out echo `top -n1` >> top.out when i run the command manually, it works. However, when i run it as a cronjob,the 'top' output is not being printed to the file,only the date is being printed. i have verified that the cron is working in the /var/log/cron file. any advise? i found the mistake. i need to specify -b as as option to top. Code:
top -b -n1 Last edited by new2ss; 11-06-2007 at 05:50 AM.. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|