- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: how to check the output of top, from editor
Operating System - Linux
1752290
Members
4213
Online
108786
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
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
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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-22-2009 12:22 AM
тАО01-22-2009 12:22 AM
# top -d 1 -n 10 > top.out
# less top.out
"top.out" may be a binary file. See it anyway?
# vi top.out
its impossible/hard to read
# cat top.out | less
its impossible/hard to read
only
# cat top.out
is working
Regards
# less top.out
"top.out" may be a binary file. See it anyway?
# vi top.out
its impossible/hard to read
# cat top.out | less
its impossible/hard to read
only
# cat top.out
is working
Regards
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2009 01:08 AM
тАО01-22-2009 01:08 AM
Solution
By default, the top output contains terminal control codes that move the cursor around, updating various parts of the display.
When you use less or vi, the control codes are made visible/non-effective, causing a huge mess.
If you want to store the output of "top" to a file, add the -b option. With it, top won't use control codes and won't cut off the list at the terminal size.
Example:
top -b -d 1 -n 10 > top.out
# less top.out
it's easy to read, and contains more information!
MK
When you use less or vi, the control codes are made visible/non-effective, causing a huge mess.
If you want to store the output of "top" to a file, add the -b option. With it, top won't use control codes and won't cut off the list at the terminal size.
Example:
top -b -d 1 -n 10 > top.out
# less top.out
it's easy to read, and contains more information!
MK
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2009 01:57 AM
тАО01-22-2009 01:57 AM
Re: how to check the output of top, from editor
Is this better ?
$ grep "Maaz" top.out | sort
enjoy, life.
Jean-Pierre
$ grep "Maaz" top.out | sort
enjoy, life.
Jean-Pierre
Smile I will feel the difference
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-24-2009 11:58 PM
тАО01-24-2009 11:58 PM
Re: how to check the output of top, from editor
On HP-UX (but not linux) there is a "-f file" option the removes the cursor commands.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP