DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 18th October 2008
bsddaemon bsddaemon is offline
Slack Daemon
 
Join Date: Oct 2008
Posts: 35
Thanked 3 Times in 3 Posts
Default How to check CPU state in non-interactive mode?

It sounds like a stupid question, but I couldnt work out how to extract the CPU state info from top.

If I run top with -b switch, it will send output to the terminal, but all CPU state info is omitted

Code:
73 processes:  2 running, 71 sleeping

Mem: 245M Active, 490M Inact, 201M Wired, 44M Cache, 110M Buf, 3708K Free
Swap: 2047M Total, 312K Used, 2047M Free


  PID USERNAME    THR PRI NICE   SIZE    RES STATE  C   TIME   WCPU COMMAND
Please shed some light
Reply With Quote
  #2   (View Single Post)  
Old 18th October 2008
vermaden's Avatar
vermaden vermaden is offline
Administrator
 
Join Date: Apr 2008
Location: pl_PL.lodz
Posts: 1,052
Thanked 118 Times in 93 Posts
Default

try that:
Code:
top -d2 -s1 10
__________________
religions, worst damnation of mankind
"If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds

Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”.
vermaden's: links resources deviantart spreadbsd
Reply With Quote
  #3   (View Single Post)  
Old 18th October 2008
bsddaemon bsddaemon is offline
Slack Daemon
 
Join Date: Oct 2008
Posts: 35
Thanked 3 Times in 3 Posts
Default

Thanks, it works, sort of actually. Im still wondering why there is no cpu info in the first display
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
State of Native Java in NetBSD? shep NetBSD Package System (pkgsrc) 1 2nd June 2009 08:13 AM
Favorite Interactive Shell JMJ_coder General software and network 7 20th May 2009 04:33 PM
pftop state query. bsdnewbie999 OpenBSD General 1 10th April 2009 03:33 AM
*BSD support for solid state disks? JMJ_coder General Hardware 3 27th June 2008 11:21 PM
netstat state LISTEN change CTOS OpenBSD General 1 4th May 2008 10:52 PM


All times are GMT. The time now is 04:19 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick