07-08-2009
Check the pstat library
This is going to be dependent on which levels of the OS you're hoping to have this work on. If you're using 11.11 or earlier, you're pretty much out of luck. There are some scripts and so forth that I can point you at that will get you a count that is reasonably close.
However, for HP-UX 11i v3 (11.31) the /usr/include/sys/pstat.h library was updated to allow precise counting of chips and cores. This update was ported back to 11i v2 (11.23) with kernel patch PHKL_34912, with a few special considerations.
The relevant calls are the mpctl() call and the pstat_getprocessor() call.
If you have access to the HP Developer Support site, you can look up a paper called "Dynamic logical processors for Hyper-Threading on HP-UX 11i v3" (4AA0-7695ENW, Rev 1, March 2007). Also, this link may give you some info
Update to the IntelŪ ItaniumŪ 2 Processor Reference Manual for Software Development and Optimization.
Hope that helps!
10 More Discussions You Might Find Interesting
1. Programming
I am trying to find the number of caches on a machine programatically.
#include <stdio.h>
#include <malloc.h>
int main(void)
{
int *ptr,*ptr1,i,j;
j=0;
i=1;
printf("Changing allocation with brk()\n");
while(1)
{
for(j=0;j<i;j++)
{
ptr =... (1 Reply)
Discussion started by: jacques83
1 Replies
2. UNIX for Dummies Questions & Answers
Hi,
Is there any command to know whether the machine 64 bit or 32 bit?
now I am using "uname -p" for this purpose but I want a straight command if it is there. (1 Reply)
Discussion started by: siba.s.nayak
1 Replies
3. Solaris
Hello,
Using a Solaris SunOS 5.10, is there anyway to limit the number of processors utilised by an external vendor application over the server, from the unix OS perspective? (1 Reply)
Discussion started by: pgop
1 Replies
4. AIX
Hello All,
Can anybody please tell me what is the maximum limit of Physical IBM Power Machine which can be handled by single HMC at a single point of time?
Thanks,
Jenish (1 Reply)
Discussion started by: jenish_shah
1 Replies
5. UNIX for Advanced & Expert Users
Hi all,
i have no of processors .in that some processors locked. how to find the particular locked processors into list of all the processors.
i hav no of processors like
ex:
processors
1021
1022
1023
1024
1025 ---it is locked
1026
--
-
-
-
-
--
2334334
so i don't know 1025 is... (1 Reply)
Discussion started by: venkatreddy
1 Replies
6. High Performance Computing
Hello everyone!
I am a bit inexperienced with administering queueing programs. I installed Torque (a PBS derivative) on a Linux cluster and it is running well. There is one annoying problem though: users can run massively parallel jobs and serial jobs too. Almost all users do a mix of the two. I... (0 Replies)
Discussion started by: gnuplot
0 Replies
7. Solaris
hi,
I am using command psrinfo -p to check the number of physical processors present on any soalris machine.I want to check the number of virtual processors assigned for particular solaris machine.
which command/set of command need to be used which can grep or show the total virtual processors... (8 Replies)
Discussion started by: omkar.jadhav
8 Replies
8. Red Hat
Hi,
i am trying to find out hpw many virtual and physical processors does any linux machine has:
output of /proc/cpuinfo is as below :
# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 26
model name : Intel(R) Xeon(R) CPU... (8 Replies)
Discussion started by: omkar.jadhav
8 Replies
9. AIX
Hi Experts -
we have power710 (no VIOs) that is already connected to hmc and everything . I already have a Physical LPAR in there and network configured . Now I plan to delete that LPAR and then put Virtualization code (COD) to virtualize that machine by building VIO servers and stuff.Also ordered... (9 Replies)
Discussion started by: JME2015
9 Replies
10. UNIX for Beginners Questions & Answers
Hi All,
.
I am trying to find whether Solaris 11 installed on physical server or on VMware/KVM.
I tried uname -a but it's giving only whether i installed on X86 or sparc machine.
I tried prtdiag command but it's giving below information.
command : prtdiag -v |grep "System... (2 Replies)
Discussion started by: sravani25
2 Replies
LEARN ABOUT HPUX
pset_destroy
pset_destroy(2) System Calls Manual pset_destroy(2)
NAME
pset_destroy() - destroy a processor set
SYNOPSIS
DESCRIPTION
The function destroys the processor set pset, releasing all constituent processors and processes by default. The processors and processes
are reassigned to the system default processor set. Once destroyed, the pset identifier becomes available for new processor sets that may
be created in the future.
The behavior when attempting to destroy a non-empty processor set may be controlled by changing the attribute of the processor set through
the function. See pset_getattr(2). The following values are supported for the attribute:
Reassign all processors in the
pset to the system default processor set. Migrate all threads and processes bound to the pset to the system default proces-
sor set.
Make the request fail with
if there are any threads or processes bound to pset or if there are processors assigned to the pset.
Make the request fail with
only if there are active threads or processes bound to the processor set. Otherwise, perform the operation by reassigning
the processors in the pset to the system default processor set.
If the threads and processes being reassigned to the default processor set have some binding to a processor or a locality domain in the
pset being destroyed, their binding is reassigned to a processor or a locality domain in the system default processor set.
A user with the privilege or a user with WRITE permission on the pset may destroy the processor set pset. The system default processor set
may never be destroyed.
Security Restrictions
Some or all of the actions associated with this system call require the privilege. Processes owned by the superuser have this privilege.
Processes owned by other users may have this privilege, depending on system configuration. See privileges(5) for more information about
privileged access on systems that support fine-grained privileges.
Note on Logical Processor and Hyper-Threading Feature
On systems with the Hyper-Threading (HT) feature enabled at the firmware level, each processor core may have more than one hyper-thread per
physical processor core. Each hyper-thread is represented to the operating system and applications as a logical processor (LCPU).
Due to the processor set contract, which specifies that applications bound to a processor set have complete and exclusive control of all
processor cores within that processor set, migration of processors between two processor sets is done at the processor core granularity.
For destruction of a processor set migrates a set of processor cores to the default processor set. Depending on the source processor set
and the default processor set's the number of logical processors visible to the users and applications may change.
EXAMPLES
Destroy a processor set with the processor set ID of pset.
RETURN VALUE
returns zero on successful completion. Otherwise, -1 is returned and is set to indicate the error.
ERRORS
fails if one or more of the following is true:
The attribute value for the processor set does not allow
deletion of a non-empty processor set.
The operation was interrupted.
pset is not a valid processor set.
The processor set functionality is not supported by the
underlying HP-UX version.
The user does not have necessary permissions to destroy a
processor set or the system default processor set was specified.
SEE ALSO
psrset(1M), pset_assign(2), pset_bind(2), pset_create(2), pset_ctl(2), pset_getattr(2), privgrp(4), privileges(5).
pset_destroy(2)