Sponsored Content
Top Forums Shell Programming and Scripting capturing output from top and format output Post 302290768 by zaxxon on Tuesday 24th of February 2009 04:40:05 AM
Old 02-24-2009
Code:
date| cut -d" " -f1-4; top -b -n1 | awk '/^Cpu/ {print $2,$4,$6,$8} /^Mem/ {print $2,$4}'

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

capturing output in script

I have the following line in my script: $sftpcmd $rmthost <<COMMANDS>> $sftplog 2>&1 For some reason this is not capturing the errors from sftp, they go to the file attached to the cron entry ie mm hh dd MM * /myscript > cron.out any idea why? digital unix 4.0d (6 Replies)
Discussion started by: MizzGail
6 Replies

2. UNIX for Dummies Questions & Answers

Capturing output from C++ program

Hi I have a C++ program that generates a lot of log information on the console, I need this output (printed using printf function) to go to a file since I will use crontab to schedule the job. I know I can do this: myprog > myfile but I don't know how to enter this in crontab. I use... (3 Replies)
Discussion started by: GMMike
3 Replies

3. Shell Programming and Scripting

top output for six processes with the same name, output changed from column to row

Hi, I have a system under test, and I use a script that does a ps. The output, is in the following format, it's basically the timestamp, followed by the rss and vsize. 09:03:57 68404 183656 68312 181944 69860 217360 67536 182564 69072 183172 69032 199276 09:04:27 68752 183292 70000 189020... (5 Replies)
Discussion started by: Bloke
5 Replies

4. Shell Programming and Scripting

Capturing the output of dbv

Hello, We have an oracle database running on a Linux host (RHEL5)...I'm trying to run Oracle dbv (database verify utility) and capture its output to a file using the following syntax but the standart output does NOT get redirected to the file... dbv blocksize=32768 ... (2 Replies)
Discussion started by: luft
2 Replies

5. Shell Programming and Scripting

Dynamic output file generation using a input text file with predefined output format

Hi, I have two files , one file with data file with attributes that need to be sent to another file to generate a predefined format. Example: File.txt AP|{SSHA}VEEg42CNCghUnGhCVg== APVG3|{SSHA}XK|"password" AP3|{SSHA}XK|"This is test" .... etc --------- test.sh has... (1 Reply)
Discussion started by: hudson03051nh
1 Replies

6. Solaris

top output and swap -s output are differing

Solaris experts, Am struggling, and wondering for the past more than one week that, how to calculate the total available and used memory/swap space. Finally installed and used top & got some understanding, but while cross-checking, there are mismatches. Main Memory top o/p - 2GB... (7 Replies)
Discussion started by: thegeek
7 Replies

7. Shell Programming and Scripting

how to format ssh top output

Hello; Am trying to generate runaway proc report using ssh thusly: =================== ssh -t -t $BOX 'TERMINAL="vt100" top -d1 -h -n 10' >> $FILE . . cat $FILE | mail -s "Latest Top `date`" $MAIL_TO ==================== But the output to e-mail comes out rather garbled .. Any ideas... (1 Reply)
Discussion started by: delphys
1 Replies

8. Shell Programming and Scripting

Capturing first output from 'top'-likes command

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

9. Shell Programming and Scripting

Capturing Output?

Hello All, I'm writing a Bash Script and in it I execute a piped command within a Function I wrote and I can't seem to redirect the stderr from the 1st pipe to stdout..? I'm setting the output to an Array "COMMAND_OUTPUT" and splitting on newlines using this --> "( $(...) )". By putting... (6 Replies)
Discussion started by: mrm5102
6 Replies

10. Shell Programming and Scripting

Format Top and prstat command output

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
DEBIAN-DISTRO-INFO(1)					      General Commands Manual					     DEBIAN-DISTRO-INFO(1)

NAME
debian-distro-info - provides information about Debian's distributions SYNOPSIS
debian-distro-info [OPTIONS] OPTIONS
--date=DATE date for calculating the version (default: today) -h, --help display help message and exit --alias=DIST print the alias (stable, testing, unstable) relative to the distribution codename passed as an argument. Only distribution code- names composed of lower case ASCII letters are accepted, and if the distribution does not qualify as stable, testing or unstable, then the same codename passed as argument is returned. -a, --all list all known versions -d, --devel latest development version -o, --old latest old (stable) version -s, --stable latest stable version --supported list of all supported stable versions -t, --testing latest testing version --unsupported list of all unsupported stable versions -c, --codename print the codename (default) -r, --release print the release version -f, --fullname print the full name SEE ALSO
distro-info(1), ubuntu-distro-info(1) AUTHOR
The script and this manual page was written by Benjamin Drung <bdrung@debian.org>. distro-info January 2011 DEBIAN-DISTRO-INFO(1)
All times are GMT -4. The time now is 09:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy