05-30-2016
Try $9+0 (to convert it into a number).
This User Gave Thanks to RudiC For This Post:
10 More Discussions You Might Find Interesting
1. HP-UX
Using HP-UX v11
Need to monitor cpu and memory usage, total for system and separately for each user in command-line mode.
Found out next ways to monitor total cpu usage under hp-ux:
1) vmstat, also shows free memory
2) sar -M
ps -eo user,pcpu - does not work, means 'user-defined format'... (4 Replies)
Discussion started by: hp-ux-user
4 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I need to capture output of prstat command for certain pid's .I found it as prstat -j filename. I created a filename projlist gave the pid number on the projlist file and run the cmd like this
>prstat -j projlist
prstat: illegal argument -- projlist
can anybody suggest how to... (1 Reply)
Discussion started by: vipin771
1 Replies
3. HP-UX
how can I find cpu usage memory usage swap usage and
I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times
my final destination is monitor process
logical volume usage above X % and number of Logical voluage above
can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies
4. Shell Programming and Scripting
Hi all,
I need a script that will check the cpu usage of a certain process and then kill the process if the % cpu is greater than 25%.
I know i can get the pid of a process by doing pidof <processname>.
Once I have the pid number is there a command in bash to return the current % cpu? (2 Replies)
Discussion started by: borderblaster
2 Replies
5. AIX
How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies
6. Solaris
Hi Guys,
I have observed the Oracle (DB USER) is utilizing 100% of the memory in the prstat -a output. I am bit confused is it normal and if not how to bring it down? ABout the machine it is a SunOS 5.10 Generic_125100-10 sun4v sparc SUNW,Sun-Fire-T200.
Please see below output of prstat -a... (12 Replies)
Discussion started by: Asteroid
12 Replies
7. Shell Programming and Scripting
I'm writing a bash script to log some selections from a sensors output (core temp, mb temp, etc.) and I would also like to have the current cpu usage as a percentage. I have no idea how to go about getting it in a form that a bash script can use. For example, I would simply look in the output of... (3 Replies)
Discussion started by: graysky
3 Replies
8. Shell Programming and Scripting
Hi,
How can I find total CPU usage in percentage? e.g. if my system has 8 CPUs and I want to list total usage for all of them, is it possible through a command?
I have tried some of the commands like top, mpstat, sar. The output of those commands has to be manipulated to derive the percentage... (14 Replies)
Discussion started by: jal_capri
14 Replies
9. Shell Programming and Scripting
Question 1:
I want to store the result of prstat to a file.
If I write in this way: prstat -a >>prstat.log, the result of prstat is stored to the file prstat.log correctly;
but if I write it in this way:prstat -a |grep abc>>prstat.log
(abc is the name of a program since I only want to trace... (3 Replies)
Discussion started by: lilili07
3 Replies
10. Solaris
Is there any scripts to capture the process which use more than 5% CPU from prstat output? (9 Replies)
Discussion started by: tharmendran
9 Replies
LEARN ABOUT DEBIAN
netsniff-ng
netsniff-ng(8) netsniff-ng-toolkit netsniff-ng(8)
NAME
netsniff-ng - the packet sniffing beast
SYNOPSIS
netsniff-ng -i|-d|--dev|--in <dev|pcap> -o|--out <dev|pcap|dir|txf> [-f|--filter <bpf-file>][-t|--type <type>][-F|--interval <uint>]
[-s|--silent][-J|--jumbo-support][-n|--num <uint>][-r|--rand] [-M|--no-promisc][-m|--mmap | -c|--clrw][-S|--ring-size <size>]
[-k|--kernel-pull <uint>][-b|--bind-cpu <cpu> | -B|--unbind-cpu <cpu>] [-H|--prio-high][-Q|--notouch-irq][-q|--less | -X|--hex |
-l|--ascii] [-v|--version][-h|--help]
DESCRIPTION
The first sniffer that invoked both, the zero-copy RX_RING as well as the zero-copy TX_RING for high-performance network I/O and
scatter/gather or mmaped PCAP I/O.
EXAMPLES
netsniff-ng --in eth0 --out dump.pcap
Capture traffic from interface 'eth0' and save it pcap file 'dump.pcap'
netsniff-ng --in any --filter http.bpf --payload
Capture HTTP traffic from any interface and print its payload on stdout
netsniff-ng --in wlan0 --bind-cpu 0,1
Capture all traffic from wlan0 interface. Schedule process on CPU 0 and 1.
OPTIONS
-i|-d|--dev|--in <dev|pcap>
Input source. Can be a network device or pcap file.
-o|--out <dev|pcap|dir|txf>
Output sink. Can be a network device, pcap file, a trafgen txf file or a directory. (There's only pcap to txf translation possible.)
-f|--filter <bpf-file>
Use BPF filter file from bpfc.
-t|--type <type>
Only handle packets of defined type:
- broadcast
- multicast
- others
- outgoing
-F|--interval <uint>
Dump interval in seconds. if -o is a directory, a new pcap will be created at each interval. The older files are left untouched.
(default value: 60 seconds)
-s|--silent
Do not print captured packets to stdout.
-J|--jumbo-support
Support for 64KB Super Jumbo Frames.
-n|--num <uint>
When zerp, capture/replay until SIGINT is received (default). When non-zero, capture/replay the number of packets.
-r|--rand
Randomize packet forwarding order (replay mode only).
-M|--no-promisc
Do not place the interface in promiscuous mode.
-m|--mmap
Mmap pcap file i.e., for replaying. Default: scatter/gather I/O.
-c|--clrw
Instead of using scatter/gather I/O use slower read(2)/write(2) I/O.
-S|--ring-size <size>
Manually set ring size in KB/MB/GB, e.g. '10MB'.
-k|--kernel-pull <uint>
Kernel pull from user interval in microseconds. Default is 10us. (replay mode only).
-b|--bind-cpu <cpu>
Bind to specific CPU (or CPU-range).
-B|--unbind-cpu <cpu>
Forbid to use specific CPU (or CPU-range).
-H|--prio-high
Run the process in high-priority mode.
-Q|--notouch-irq
Do not touch IRQ CPU affinity of NIC.
-q|--less
Print less-verbose packet information.
-X|--hex
Print packet data in hex format.
-l|--ascii
Print human-readable packet data.
-v|--version
Print version.
-h|--help
Print help text and lists all options.
AUTHOR
Written by Daniel Borkmann <daniel@netsniff-ng.org> and Emmanuel Roullit <emmanuel@netsniff-ng.org>
DOCUMENTATION
Documentation by Emmanuel Roullit <emmanuel@netsniff-ng.org>
BUGS
Please report bugs to <bugs@netsniff-ng.org>
2012-06-29 netsniff-ng(8)