Sponsored Content
Full Discussion: problems in redirecting TOP
Operating Systems Solaris problems in redirecting TOP Post 302079254 by mr_manny on Friday 7th of July 2006 06:00:07 PM
Old 07-07-2006
I take it you don't have any problems running from command-line?


top:

-bash-3.00$ top -d 1 > /tmp/top.lst
-bash-3.00$ cat /tmp/top.lst
load averages: 0.28, 0.39, 0.40 14:58:39
42 processes: 41 sleeping, 1 on cpu

Memory: 16G real, 9929M free, 6067M swap in use, 12G swap free


PID USERNAME LWP PRI NICE SIZE RES STATE TIME CPU COMMAND
18827 cquest 115 26 11 0K 0K sleep 77:32 2.66% java
24109 jmcontre 1 59 0 3784K 1536K cpu/1 0:00 0.02% top
24085 jmcontre 1 49 0 3000K 2392K sleep 0:00 0.02% bash
24083 jmcontre 1 59 0 8232K 2736K sleep 0:00 0.02% sshd
99 root 6 59 0 3896K 3088K sleep 0:44 0.00% picld
627 root 1 100 -20 2304K 1552K sleep 0:37 0.00% xntpd
24080 root 1 59 0 8448K 4864K sleep 0:00 0.00% sshd
7 root 13 59 0 8864K 7848K sleep 0:24 0.00% svc.startd
113 root 25 59 0 3856K 2936K sleep 0:23 0.00% nscd
9 root 16 59 0 9648K 8696K sleep 0:12 0.00% svc.configd
1 root 1 59 0 2392K 1392K sleep 0:08 0.00% init
220 root 4 59 0 4792K 3816K sleep 0:07 0.00% inetd
207 root 1 60 0 2696K 1336K sleep 0:07 0.00% cron
354 root 12 59 0 5712K 5016K sleep 0:06 0.00% fmd
535 root 1 59 0 0K 0K sleep 0:04 0.00% snmpd


prstat:

-bash-3.00$ prstat 1 1 > /tmp/top.lst
-bash-3.00$ cat /tmp/top.lst
PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
18827 cquest 6154M 5590M sleep 26 11 1:17:35 1.6% java/115
24111 jmcontre 1624K 1272K cpu1 49 0 0:00:00 0.0% prstat/1
24085 jmcontre 3000K 2392K sleep 49 0 0:00:00 0.0% bash/1
24083 jmcontre 8232K 2736K sleep 59 0 0:00:00 0.0% sshd/1
627 root 2304K 1552K sleep 100 - 0:00:37 0.0% xntpd/1
99 root 3896K 3088K sleep 59 0 0:00:44 0.0% picld/6
223 root 2136K 1440K sleep 59 0 0:00:00 0.0% ttymon/1
209 daemon 2608K 1528K sleep 59 0 0:00:00 0.0% rpcbind/1
224 root 2104K 1360K sleep 59 0 0:00:00 0.0% ttymon/1
212 daemon 2656K 1936K sleep 59 0 0:00:00 0.0% statd/1
323 root 4600K 2208K sleep 59 0 0:00:00 0.0% syslogd/19
131 root 2720K 1936K sleep 59 0 0:00:00 0.0% devfsadm/6
126 root 2344K 1360K sleep 59 0 0:00:00 0.0% powerd/3
213 root 2000K 1248K sleep 59 0 0:00:00 0.0% sac/1
207 root 2696K 1336K sleep 60 0 0:00:07 0.0% cron/1
Total: 42 processes, 271 lwps, load averages: 0.17, 0.34, 0.38
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How Can I Have Top Display The Top 20 Processes??

how can i do that in a script withough havin the script halt at the section where the top command is located. am writign a script that will send me the out put of unx commands if the load average of a machine goes beyond the recommended number. top -n 20 i want to save this output to a file... (1 Reply)
Discussion started by: TRUEST
1 Replies

2. Programming

Redirecting

How to redirect the contents of a file to a command? The contents of the file are the arguments necessary for the command. thx in advance. bye svh (5 Replies)
Discussion started by: svh
5 Replies

3. Solaris

Problems Installing Top

I've been trying to install Top on our Solaris box but it's giving me some trouble. The uname -a command shows SunOS servername 5.9 Generic sun4u sparc SUNW,Ultra-250 I downloaded Top form www.unixtop.com. On the initial install I got errors because I didn't have a C compiler installed.... (2 Replies)
Discussion started by: KenLynch
2 Replies

4. UNIX for Advanced & Expert Users

MX redirecting

I in no means consider myself a expert in unix however my question is a little more complex. I am running a mac os 10 server and all web settings and email settings have been set up using the unix terminal. I am in the process or redirecting my mxrecords to a spam filtering company but i am... (11 Replies)
Discussion started by: nbredthauer
11 Replies

5. Web Development

Apache redirecting

Dear All I need to redirect requests coming in on a second domain, to a page within an existing web site. So basicly http:\\webtest should be redirected to http:\\ustnd5\ukt\newsroom\newsroom.jsp I have the line ProxyPassReverse /ukt/newsroom/newsroom.jsp http://webtest:10080/ ... (1 Reply)
Discussion started by: wjones
1 Replies

6. AIX

Top command in AIX 4.2 (no topas, no nmon, no top)?

Is there a 'top' command equivalent in AIX 4.2 ? I already checked and I do not see the following ones anywhere: top nmon topas (1 Reply)
Discussion started by: Browser_ice
1 Replies

7. Shell Programming and Scripting

Redirecting stdin from fd 3-9?

Hi I'm trying to do something on the bash command line that I will later put into a bash shell script. I'm trying to take a program that reads stdin (using getline) and be able to keep it running in the background and fire "commands" to it. So what I thought I should do was to try taking... (3 Replies)
Discussion started by: niceguyeddie
3 Replies

8. AIX

Need a list of top 10 CPU using processes (also top 10 memory hogs, separately)

Okay, I am trying to come up with a multi-platform script to report top ten CPU and memory hog processes, which will be run by our enterprise monitoring application as an auto-action item when the CPU and Memory utilization gets reported as higher than a certain threshold I use top on other... (5 Replies)
Discussion started by: thenomad
5 Replies

9. Shell Programming and Scripting

redirecting help

I am trying to create the file and redirect the output in the same command line which is line 4 in the below program. #!/bin/bash read -p "Enter File Name:" value1 echo "Your File Name is $value1" sed 's/abcd/'$value1'/g' abcd_calls > $value1_calls This is the error it generates ... (3 Replies)
Discussion started by: learnbash
3 Replies

10. UNIX for Advanced & Expert Users

Clarification about redirecting

Hi AM Using Unix Aix Used ${CMD} 2> ${ERR} Dont get what above statement works . SCRIPT=`basename $0` ERR=$PWD/$SCRIPT.err DATE=`date +"%d/%m/%Y"` CMD=2 ${CMD} 2> ${ERR} if then echo "SUCCESS" else echo "FAILURE" fi (1 Reply)
Discussion started by: Venkatesh1
1 Replies
cron(8) 						      System Manager's Manual							   cron(8)

NAME
cron - The system clock daemon SYNOPSIS
/usr/sbin/cron DESCRIPTION
The cron daemon runs shell commands at specified dates and times. Commands that are to run according to a regular or periodic schedule are found within the crontab files. Commands that are to run once only are found within the at files. You submit crontab and at file entries by using the crontab and at commands. Because the cron process exits only when killed or when the system stops, only one cron daemon should exist on the system at any given time. Normally, you start the cron daemon from within a run command file. During process initialization and when cron detects a change, it examines the crontab and at files. This strategy reduces the overhead of checking for new or changed files at regularly scheduled intervals. The cron command creates a log of its activities. The cron daemon must be started from the system startup scripts because it must begin execution without a login user ID set. The cron daemon starts each job with the following process attributes stored with the job by the invoking process: Login user ID Effective and real user IDs Effective and real group IDs Supplementary groups It also establishes the following attributes from the authentication profile of the account associated with the login user ID of the invok- ing process: Audit control and disposition masks Kernel authorizations DIAGNOSTICS
The at and batch programs will refuse to accept jobs submitted from processes whose login user ID is different from the real user ID. FILES
Specifies the command path. Main cron directory Directory containing the crontab files. List of allowed users. List of denied users His- tory information for cron Queue description file for at, batch, and cron RELATED INFORMATION
Commands: at(1), crontab(1), rc0(8), rc2(8), rc3(8) Files: queuedefs(4) delim off cron(8)
All times are GMT -4. The time now is 02:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy