- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: "top -c" doesn't work from under cron
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2008 12:03 AM
01-08-2008 12:03 AM
"top -c" doesn't work from under cron
I use this command:
/usr/bin/top -bc -n1 >/tmp/top.out
This works nice from a command line, but when I run it under cron, "top" output is cutted to 80 symbols, so I don't see command line for each process.
I guess it is related to the fact, that it is no terminal attached when script is running under cron. But how to fix this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2008 12:17 AM
01-08-2008 12:17 AM
Re: "top -c" doesn't work from under cron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2008 12:18 AM
01-08-2008 12:18 AM
Re: "top -c" doesn't work from under cron
#export UNIX95=1;top -h -n5 -d1 -f
It'll run from crontab also.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2008 12:23 AM
01-08-2008 12:23 AM
Re: "top -c" doesn't work from under cron
top: procps version 3.2.3
usage: top -hv | -bcisS -d delay -n iterations [-u user | -U user] -p pid [,pid ...]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2008 01:22 AM
01-08-2008 01:22 AM
Re: "top -c" doesn't work from under cron
export UNIX95;top -d 1 -n 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2008 03:08 AM
01-08-2008 03:08 AM
Re: "top -c" doesn't work from under cron
UNIX95=1 top -d1 -n2
This sets the variable for that single command.