- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- CPU number
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2005 09:49 AM
04-13-2005 09:49 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2005 09:52 AM
04-13-2005 09:52 AM
Re: CPU number
Also stm (xstm for GUI) will also tell you.
Sally
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2005 09:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2005 10:06 AM
04-13-2005 10:06 AM
Re: CPU number
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2005 08:58 PM
04-13-2005 08:58 PM
Re: CPU number
/* returns the number of cpus installed */
#include
int main()
{
return mpctl(MPC_GETNUMSPUS,0,0);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2005 09:39 PM
04-13-2005 09:39 PM
Re: CPU number
if running as root:
use SAM
or
echo runningprocs/D | adb -k
/stand/vmunix /dev/mem
Processor speed:
echo itick_per_usec/D | adb -k
/stand/vmunix /dev/mem
If you have access to perl:
Processor Speed:
perl -e 'local($PSTAT, $PSTAT_PROCESSOR)=(239,10);
local($struct_pst_processor)=("L30");
local($cpu_info, $cpu_ticks);
$cpu_info = "\0" x 120;
syscall($PSTAT, $PSTAT_PROCESSOR, $cpu_info, length($cpu_info), 1, 0);
($cpu_ticks)=(unpack($struct_pst_processor, $cpu_info))[26];
print "speed=".int($cpu_ticks/10000)."\n";'
(Thanks to Nancy Rippey)
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2005 01:53 AM
04-14-2005 01:53 AM
Re: CPU number
i.e.:
2 CPU(s) @ 550 Mhz
The output is than awk-able for use in other scripts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2005 02:12 AM
04-14-2005 02:12 AM
Re: CPU number
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2005 02:24 AM
04-14-2005 02:24 AM
Re: CPU number
I have another one that is also helpful determining the amount of memory in use and total installed. It shows the following when run:
46 %used ( 2267 Mb free ) 4096 Mb physical
We run a mixed shop here, so it was written to run on HP, SUN & AIX. Enjoy!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2005 02:32 AM
04-14-2005 02:32 AM
Re: CPU number
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2005 03:23 AM
04-14-2005 03:23 AM
Re: CPU number
Just a quick note in case you're running vpars or npars:
If you're running virtual partitions most of the above methods will only show the CPU's that are allocated for that partition. If you actually want to know the number of physical CPU's available across all vpars you can use the vparstatus command and look at the max number of cpu's.
If you're using npars and you want to know the total number of CPU's across all partitions I think the easiest way would be to use the GSP commands.
Rgds,
Anthony