# How to find the usage of Individual cpu core usage



## maruthu (Jul 17, 2010)

How to find the usage of individual cpu core usage in FreeBsd server.

What command is used to find the individual cpu core usage ?


----------



## swa (Jul 17, 2010)

Try 'top -P' 
More info http://www.freebsd.org/cgi/man.cgi?query=top&manpath=FreeBSD+8.0-RELEASE


----------



## maruthu (Jul 19, 2010)

*Thanks for your valuable replay*

But when i executed "*top -P*" command in my server it shows "illegal option" like that.

Is this only supported in latest version? 

My FreeBsd server version is 6.0. Can you Please clarify my doubt?

Thanks,
Maruthu


----------



## mk (Jul 19, 2010)

The top(1)  and vmstat(8)  now support -P flag which displays per-CPU statistics.
this from 7.1 Release Notes. you have to update your system in order to use this.


----------



## maruthu (Jul 19, 2010)

Thanks.


----------



## phoenix (Jul 19, 2010)

To make top(1) output really useful, consider adding the following to your shell config file:

```
[b]csh-based shells:[/b]
setenv TOP -CHP

[b]sh-based shells:[/b]
export TOP="-CHP"
```

That will start top with -CHP automatically, everytime.

See the man page for a description of what each option does.


----------



## maruthu (Aug 6, 2010)

Hi,

After very long time, my system admin upgrade the freebsd machine to 7.2 Release.

I gave the command *top -P* in terminal. But it is showing the overall usage only. Not giving the usage of each core.

Is it possible to get the usage of each core using top -P? or

Is any other command is available to get the usage of each core?

~Thanks


----------



## OH (Aug 6, 2010)

Did you look at the third and consecutive lines?


----------



## Deleted member 2077 (Aug 10, 2010)

mk said:
			
		

> The top(1)  and vmstat(8)  now support -P flag which displays per-CPU statistics.
> this from 7.1 Release Notes. you have to update your system in order to use this.



haha, weird, this has worked on my server for awhile now... Well, as long as I can remember...6 point release was installed in 06 or 07 if I recall correctly.  I follow release, not stable.

FreeBSD 6.4-RELEASE-p10 

top:

```
CPU 0:  0.7% user,  0.0% nice,  1.5% system,  0.7% interrupt, 97.0% idle
CPU 1:  0.0% user,  0.0% nice,  0.0% system,  0.4% interrupt, 99.6% idle
```

I don't know. Maybe they back ported it into one of the 6.x versions.


----------



## maruthu (Aug 13, 2010)

*Thanks for your valuable replay*

Hi,

I have checked in the man page. Both vmstat(8) and top(1) support per-cpu usage command from 6.4 Release . But per-cpu usage is not supported when i check man page for the above two commands in 7.0 Release.

i couldn't understand here. why like this? check the below url for your reference.

http://www.freebsd.org/cgi/man.cgi?...ion=8&manpath=FreeBSD+7.0-RELEASE&format=html

~Thanks


----------

