01-25-2013
PLEASE use code tags as demanded!
Reading man pages is highly educational and sometimes really helps. cf.
man top:
Quote:
-b : Batch-mode operation
Starts top in 'Batch' mode, which could be useful for sending output from top to other programs or to a file.
The messy stuff in your sample is terminal control chars, usually introduced by an <ESC> char, followed by the terminal command (position, colour, ...). More info:
man console_codesYou can try to remove them with a script for awk, sed, perl, ...
Last edited by RudiC; 01-25-2013 at 05:28 AM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm trying to write a script to email the output of 'ls -lt' command that are 30 days old along with headers for eg. like owner, date, timestamp and a portion of some special character files like 'slfpay$/#:032508AA' in /home/test directory, I just want the numbers from the last field ($9), also... (3 Replies)
Discussion started by: mbak
3 Replies
2. Shell Programming and Scripting
hi,
I want to extract and save the cpu(s) information from top command output, but individual cpu statistics separately on a multi-processor machine.
In command line, top will show this statistics when we press the switch "1".
any ideas?
thanks,
meharo (3 Replies)
Discussion started by: meharo
3 Replies
3. Shell Programming and Scripting
I have written shell script to send file as an attachemt of email and output of "top -o res" command as email body. it works fine if i execute manually from prompt but it does not send "top -o res" command output in email body when it is executed via crontab. Any suggestions. My script is below:... (5 Replies)
Discussion started by: needyourhelp10
5 Replies
4. Shell Programming and Scripting
Hi,
I'm very new to UNIX scripting and find quite difficult to understand simple UNIX syntax. Really appreciat if somebody could help me to give simple codes for my below problems:-
1) I need to search for a string "TTOH 8031950001" in a files which filename will be "*host*'. For example, the... (3 Replies)
Discussion started by: cuji
3 Replies
5. HP-UX
Hello all,
I've been woking on Solaris and Linux (Red Hat) so far but now I've inherited an HP-UX system and having minor issues with syntax...Appreciate if you could help me out here..
1) I'm trying to sort the output of the top command in HP-UX 11.11 by pressing O (capital O) after typing... (2 Replies)
Discussion started by: luft
2 Replies
6. Shell Programming and Scripting
Is this a stupid code??
top > top.out &
sleep 2
kill %1
cat top.out
Thanks, (6 Replies)
Discussion started by: Shawn, Lee
6 Replies
7. UNIX for Advanced & Expert Users
Hi All,
In the output of TOP command in my unix system, i monitored that some process has utilization more than 100% even some process has 4000% utilisation.
Please help me understand how it is possible to show more than 100% utilization.
Please see the screenshot below:... (2 Replies)
Discussion started by: anand2308
2 Replies
8. Shell Programming and Scripting
need help with formatting output of command top and prstat. My requirment is to remove few columns and display remaining . But when i used awk to do that the output seems to be have gone vague, mixing the column values.
After using awk to print particular column the output seems to have lost... (1 Reply)
Discussion started by: NarayanaPrakash
1 Replies
9. UNIX for Dummies Questions & Answers
Hello,
I am a beginner, I have currently Solaris 11 on a vmware machine. Whenever I type a command like 'ls' the screen scrolls to the end of the screen. I am unable to see the entire list of directories and files. I have tried ls |page command, but looking out for a better option. (3 Replies)
Discussion started by: farheenprasad
3 Replies
10. UNIX for Dummies Questions & Answers
Dear All,
I created a small script to get the CPU, GIS usage etc automatically. However when i run this script manually its working , but when i run through cronjob i am not getting any output.
Can anyone please help me on this. I am using SuseLinux.
Thank you in advance.
#!/bin/sh
{... (2 Replies)
Discussion started by: Nitin Kapoor
2 Replies
LEARN ABOUT CENTOS
report-cli
REPORT-CLI(1) LIBREPORT MANUAL REPORT-CLI(1)
NAME
report-cli - Work with ABRT problem directories from command line.
SYNOPSIS
report-cli [-vsp] -L[PREFIX] [PROBLEM_DIR]
report-cli [-vsp] -e EVENT PROBLEM_DIR
report-cli [-vsp] -a[y] PROBLEM_DIR
report-cli [-vsp] -c[y] PROBLEM_DIR
report-cli [-vsp] -r[y|o|d] PROBLEM_DIR
DESCRIPTION
report-cli is a command line tool that manages application crashes and other problems caught by abrtd daemon, or created by other programs
using libreport. It enables access to, manipulation of problem data, and reporting.
OPTIONS
-L[PREFIX]
List possible events [which start with PREFIX]
-e EVENT
Run EVENT on PROBLEM_DIR
-a, --analyze
Run analyze event(s) on PROBLEM_DIR
-c, --collect
Run collect event(s) on PROBLEM_DIR
-r, --report
Analyze, collect and report problem data in PROBLEM_DIR
-d, --delete
Remove PROBLEM_DIR after reporting
-y, --always
Noninteractive: don't ask questions, assume positive answer to all of them
-o, --report-only
With -r: do not run analyzers, run only reporters
-v, --verbose
Be verbose
-s
Log to syslog
-p
Add program names to log
-V, --version
Display version and exit
AUTHORS
o ABRT team
LIBREPORT 2.1.11 06/18/2014 REPORT-CLI(1)