Sponsored Content
Operating Systems HP-UX Formatted TOP command output in file Post 302760971 by lravip123 on Friday 25th of January 2013 12:46:21 AM
Old 01-25-2013
Formatted TOP command output in file

Hi All,

I want generate HP-UX overall system performance report.

I tried executing top command and write that out put to file. but am not able to view the report in proper format.

I can see report like below in file but i can see properly in terminal.

Please suggest how can i get proper format of out as it shown in the terminal.

[?25h[m[H[2J7[1;44r8System: ussbcap1[38CThu Jan 24 23:40:17 2013[BLoad averages: 4.50, 5.64, 6.52[B549 processes: 429 sleeping, 93 running, 27 zombies[BCpu states:[BCPU LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS[B 0 4.51 73.3% 0.0% 26.7% 0.0% 0.0% 0.0% 0.0% 0.0%[B 1 4.49 93.1% 0.0% 6.9% 0.0% 0.0% 0.0% 0.0% 0.0%[B--- ---- ----- ----- ----- ----- ----- ----- ----- -----[Bavg 4.50 83.2% 0.0% 16.8% 0.0% 0.0% 0.0% 0.0% 0.0%[2BMemory: 6586084K (6364224K) real, 8876320K (8507888K) virtual, 727260K free Page# 1/18[2BCPU TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND[B 1 ? 6922 mqm[6C234 24 15748K 2040K run 66562:13 40.53 40.46 autocons[B 1 ? 2372 root[5C152 20 15336K 1884K run 26462:41 25.87 25.83 dmisp[B 0 ? 5531 cyclone 152 20 206M 49916K run 76304:32 20.97 20.93 java[B 1 ? 26049 cyclone 152 20 1292M 1098M run 323:13 17.74 17.71 java[B 1 ? 20174 cyclone 152 20 1194M 1012M run[5C94:11 5.34 5.33 java[B 1 ? 3415 root[5C-16 20 45520K 8528K run 7149:30 2.12 2.12 midaemon[B 1 ? 8185 root[5C158 20 38164K 36416K sleep 0:00 4.36 1.29 sh[B 0 ? 8178 mqm[6C183 20 12900K 1388K run[6C0:00 3.70 1.22 auto_remote[B 0 ? 8192 mqm[6C183 20 12900K 1388K run[6C0:00 4.71 1.22 auto_remote[B 1 ? 37

Last edited by lravip123; 01-25-2013 at 02:59 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

mailing customized and formatted ls -lt command output

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

Extract header from top command output

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

Need help with shell script - output of top command

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

String searching and output to a file in a formatted text

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

Sorting top command output in HP_UX 11.11

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

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

7. UNIX for Advanced & Expert Users

Conflicts in the output of TOP command

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

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

9. UNIX for Dummies Questions & Answers

Unable to scroll to the top of the output of a command

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

Top Command Output is not coming via Cronjob

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
JAVA-WRAPPERS(7)						   Java wrappers						  JAVA-WRAPPERS(7)

NAME
java-wrappers - capacities shared by java wrapper scripts DESCRIPTION
Most Java programs are not run directly, but through small shell scripts that take care of various things, such as finding a suitable java environment and looking for libraries. To ease the task of the maintainers, they rely on a library providing runtime detection, library detection and other features. This manual page describes the common features of all those scripts, and to which point you can configure them. This is mainly done via environment variables. ENVIRONMENT VARIABLES
java-wrappers understands some environment variables: JAVA_CMD The java command that will be run. If this variable is set, it disables all lookup for a java runtime. JAVA_BINDIR Specifies a directory that will be looked for a java or a jdb executable (depending on the setting of JAVA_DEBUGGER). It has prece- dence over JAVA_HOME but not over JAVA_CMD. JAVA_HOME A path to a java runtime. If this variable is set, all lookup for a java runtime is disabled, except that if no java executable is found in the path, the command java is used. JAVA_FLAVOR A probably more easy-to-use version of the JAVA_HOME variable: instead of specifying the full path of the java runtime, you name it. List of available flavors can be found in the file /usr/lib/java-wrappers/jvm-list.sh. See examples below. JAVA_DEBUGGER If this is set, the wrapper will try to pick up a java debugger rather than a java interpreter. This will fail if the jbd of the runtime found is a stub. JAVA_CLASSPATH Additional classpath, will have priority over the one found by the wrapper. JAVA_ARGS Additional arguments to the java command. They will come before all other arguments. FORCE_CLASSPATH If this variable is set, it will be the only classpath. You'd better know what you are doing. DEBUG_WRAPPER This is probably the most important variable; if it set, the wrapper will print out useful information as it goes by its business, such as which runtime it did find, and which command is run eventually. JAVA_JARPATH The path where the wrappers will go looking for jar archives. If not set, the wrapper will look into the default directory, /usr/share/java. Warning : the wrapper will not look anywhere else than in JAVA_JARPATH. Setting it incorrectly will most probably result in early crashes. EXAMPLES
The examples all rely on rasterizer(1), from the package libbatik-java, but they really apply to all scripts that use java-wrappers. Print out debugging information: DEBUG_WRAPPER=1 rasterizer Limit rasterizer's memory to 80 MB: JAVA_ARGS=-Xmx80m rasterizer Force rasterizer to run with kaffe(1): JAVA_HOME=/usr/lib/kaffe rasterizer The same, but using JAVA_BINDIR: JAVA_BINDIR=/usr/lib/kaffe/bin rasterizer Force rasterizer to run with openjdk: JAVA_FLAVOR=openjdk rasterizer Debug rasterizer with Sun's debugger, while printing debugging information from the wrapper: DEBUG_WRAPPER=1 JAVA_CMD=/usr/lib/jvm/java-6-sun/bin/jdb rasterizer BUGS
Care has been taken to make the wrappers bug-free. If that was not the case, please file a bug report against the java-wrappers package. If you wish to submit any problem with a java executable relying on java-wrappers, please also submit the output of the command run with DEBUG_WRAPPER=1. It will save one mail exchange and therefore potentially reduce the time it takes to fix the bug. DEVELOPERS
There is currently no documentation about writing a wrapper script save the comments in /usr/lib/java-wrappers/java-wrappers.sh. If you have to write one, we suggest you base yourself upon, for instance, the rasterizer wrapper script, or any other one (just pick up any direct reverse dependency of java-wrappers and look for scripts). SEE ALSO
java(1), jdb(1) /usr/lib/java-wrappers/java-wrappers.sh AUTHOR
java-wrappers and its documentation were written by Vincent Fourmond <fourmond@debian.org> Version 0.1.16 2010-05-04 JAVA-WRAPPERS(7)
All times are GMT -4. The time now is 09:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy