- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: script: top via email
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
Forums
Discussions
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
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
11-06-2003 06:29 PM
11-06-2003 06:29 PM
I wanted to write a small script to send the output of the top -d 1 - command via email to our unix-inbox for monitoring.
There is no problem to run this script manually, but when i tried to trigger it within crontab it gives me an error. Here the critical line:
/bin/top -d 1 | mailx -s "Output of top-command. Please check!" $EMAIL
and here the error:
Sorry, I need to know a more specific terminal type than 'unknown'.
I added a statement like TERM="hpterm" but id didn't help.
Any ideas?
Thanks for your help
Peter
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2003 06:36 PM
11-06-2003 06:36 PM
SolutionTry using the "-f filename" option to "top" to output to a file and then e-mail that file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2003 07:23 PM
11-06-2003 07:23 PM
Re: script: top via email
Where did you put this ?
It needs to precede the top command, as in
TERM=hpterm /bin/top -d 1 | /usr/bin/mailx -s "Output of top-command. Please check!" $EMAIL
-- Graham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2003 07:35 PM
11-06-2003 07:35 PM
Re: script: top via email
i must have sit on my eyes when I looked at the man-page of the top command. But finally the -f - option solved the problem.
Have a nice weekend
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2003 09:27 PM
11-06-2003 09:27 PM
Re: script: top via email
I found out that the -f - option of the top-command is not documented in HP-UX 10.20 but can be found in HP-UX 11.00. That's why I didn't get it yesterday.