Sponsored Content
Full Discussion: problems in redirecting TOP
Operating Systems Solaris problems in redirecting TOP Post 302079229 by rana_d on Friday 7th of July 2006 12:14:48 PM
Old 07-07-2006
Error problems in redirecting TOP

Hi All,
I am trying to run top in crontab, but I am getting problem while trying to redirecting the output of top cmd.
I am getting the process part but the CPU states, user, kernel, iowait, swap part is not showing.

While trying top > some_file_name the output i'm getting,

top: cannot open /dev/kmem
kvm_open: Permission denied

Is that the problem or there is any other way i can get that data directed as well.

Thanks,
Ran
 

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
ipfstat(1M)                                               System Administration Commands                                               ipfstat(1M)

NAME
ipfstat - reports on packet filter statistics and filter list SYNOPSIS
ipfstat [-aACdfghIilnosv] ipfstat [-C] [-D addrport] [-P protocol] [-S addrport] [-T refreshtime] DESCRIPTION
The ipfstat command examines /dev/kmem using the symbols _fr_flags, _frstats, _filterin, and _filterout. To run and work, it needs to be able to read both /dev/kmem and the kernel itself. The default behavior of ipfstat is to retrieve and display the statistics which have been accumulated over time as the kernel has put pack- ets through the filter. The role of ipfstat is to display current kernel statistics gathered as a result of applying the filters in place (if any) to packets going in and out of the kernel. This is the default operation when no command line parameters are present. When supplied with either -i or -o, ipfstat will retrieve and display the appropriate list of filter rules currently installed and in use by the kernel. ipfstat's use is restricted through access to /dev/ipl and /dev/ipstate. The default permissions of these files require ipfstat to be run as root for all operations. Using the -t option causes ipfstat to enter the state top mode. In this mode the state table is displayed similarly to the way the Unix top utility displays the process table. The -C, -D, -P, -S and -T command line options can be used to restrict the state entries that will be shown and to specify the frequency of display updates. In state top mode, use the following keys to influence the displayed information: d Select information to display. l Redraw the screen. q Quit the program. s Switch between different sorting criteria. r Reverse the sorting criteria. States can be sorted by protocol number, by number of IP packets, by number of bytes, and by time-to-live of the state entry. The default is to sort by the number of bytes. States are sorted in descending order, but you can use the r key to sort them in ascending order. It is not possible to interactively change the source, destination, and protocol filters or the refresh frequency. This must be done from the command line. The screen must have at least 80 columns for correct display. However, ipfstat does not check the screen width. Only the first X-5 entries that match the sort and filter criteria are displayed (where X is the number of rows on the display). There is no way to see additional entries. OPTIONS
The following options are supported: -a Display the accounting filter list and show bytes counted against each rule. -A Display packet authentication statistics. -C Valid only in combination with -t. Display "closed" states as well in the top. Normally, a TCP connection is not displayed when it reaches the CLOSE_WAIT protocol state. With this option enabled, all state entries are displayed. -d Produce debugging output when displaying data. -D addrport Valid only in combination with -t. Limit the state top display to show only state entries whose destination IP address and port match the addrport argument. The addrport specification is of the form ipaddress[,port]. The ipaddress and port should be either numerical or the string any (specifying any IP address and any port, in that order). If the -D option is not specified, it defaults to -D any,any. -f Show fragment state information (statistics) and held state information (in the kernel) if any is present. -g Show groups currently configured (both active and inactive). -h Show per-rule the number of times each one scores a "hit". For use in combination with -i. -i Display the filter list used for the input side of the kernel IP processing. -I Swap between retrieving inactive/active filter list details. For use in combination with -i. -l When used with -s, show a list of active state entries (no statistics). -n Show the rule number for each rule as it is printed. -o Display the filter list used for the output side of the kernel IP processing. -P protocol Valid only in combination with -t. Limit the state top display to show only state entries that match a specific protocol. The argument can be a protocol name (as defined in /etc/protocols) or a protocol number. If this option is not specified, state entries for any pro- tocol are specified. -s Show packet/flow state information (statistics only). -S addrport Valid only in combination with -t. Limit the state top display to show only state entries whose source IP address and port match the addrport argument. The addrport specification is of the form ipaddress[,port]. The ipaddress and port should be either numerical or the string any (specifying any IP address and any port, in that order). If the -S option is not specified, it defaults to -S any,any. -t Show the state table in a way similar to the way the Unix utility, top, shows the process table. States can be sorted in a number of different ways. -T refreshtime Valid only in combination with -t. Specifies how often the state top display should be updated. The refresh time is the number of sec- onds between an update. Any positive integer can be used. The default (and minimal update time) is 1. -v Turn verbose mode on. Displays additional debugging information. FILES
o /dev/kmem o /dev/ksyms o /dev/ipl o /dev/ipstate ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWipfu | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
ipf(1M), attributes(5) NOTES
To view license terms, attribution, and copyright for IP Filter, the default path is /usr/lib/ipf/IPFILTER.LICENCE. If the Solaris operat- ing environment has been installed anywhere other than the default, modify the given path to access the file at the installed location. SunOS 5.10 12 Nov 2003 ipfstat(1M)
All times are GMT -4. The time now is 11:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy