- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to Assign a Process to a Specific Processo...
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
03-09-2004 10:58 PM
03-09-2004 10:58 PM
Can someone tell me if its possible to assign a process to a specific processor on a multi processor system?
I'm running HP-UX 11.0 on an N Class server.
Thanks,
Tom
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2004 11:05 PM
03-09-2004 11:05 PM
SolutionI think you will need something like PRM (process resource manager), take a look at next link.
http://www.software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=B3835DATRY
Hope this helps,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2004 11:11 PM
03-09-2004 11:11 PM
Re: How to Assign a Process to a Specific Processor
this is for 10.2
http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000024603782
i am not sure about 11.0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2004 06:11 AM
03-11-2004 06:11 AM
Re: How to Assign a Process to a Specific Processor
HP-UX 11i supports PSETs, which would do what you want. You can use PRM to set it up or you could use the psrset command.
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2004 07:43 AM
03-11-2004 07:43 AM
Re: How to Assign a Process to a Specific Processor
remember from whence it came. I've attached a gzipped binary.
(In case you'd like to give it a try)
I looked for the source, depot, or package, to no avail.
(I will find this... and post again later)
We've simply copied around as needed. Works just fine.
Usage is simple.
To bind:
pbind -b PROCID PID
To query:
pbind -q PID
To UNbind:
pbind -u PID
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2004 08:42 AM
03-11-2004 08:42 AM
Re: How to Assign a Process to a Specific Processor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2004 08:54 AM
03-11-2004 08:54 AM
Re: How to Assign a Process to a Specific Processor
(Beyond simple "hello world" and "system" calls, that is)
I did a truss on the pbind command we use, and it does
indeed simply call mpctl functions to do its dirty work.
Thanks.
(And no points here, please)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2004 09:45 AM
03-11-2004 09:45 AM
Re: How to Assign a Process to a Specific Processor
http://www.cbronline.com/currentnews/84088db57bc626a780256e35003855e6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2004 09:45 AM
03-11-2004 09:45 AM
Re: How to Assign a Process to a Specific Processor
http://www.hp.com.tw/ssn/unix/0208/unix020803.asp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2004 12:53 AM
03-12-2004 12:53 AM
Re: How to Assign a Process to a Specific Processor
Thanks for your responses. I've been tooling with the mpctl call and I'm a little confused. I call it to assign a PID to an SPU and it returns the SPU number that I am passing, but when I inspect the process it's not where I think it should be. My process started on processor 1 and ended on 0. Why didn't it move to processor 4? Here's my simple minded code:
#include
#include
#include
#include
#include
main( argc, argv, envp )
int argc;
char *argv[];
char *envp[];
{
int retVal;
printf("%u\n",getpid());
system("ps -ef|grep zzdx8n > t1.out");
retVal=mpctl(MPC_GETNUMSPUS);
printf("%u\n",retVal);
retVal=mpctl(MPC_GETCURRENTSPU);
printf("%u\n",retVal);
retVal=mpctl(MPC_SETPROCESS_FORCE,4,getpid());
printf("%u\n",retVal);
sleep(1);
retVal=mpctl(MPC_GETCURRENTSPU);
printf("%u\n",retVal);
system("ps -ef|grep zzdx8n >> t1.out");
retVal=mpctl(MPC_GETCURRENTSPU);
printf("%u\n",retVal);
Here's the output file:
zzdx8n 2492 25134 1 08:45:01 ttyp3 0:00 ./t1
zzdx8n 2493 2492 1 08:45:01 ttyp3 0:00 sh -c ps -ef|grep zzdx8n > t1.out
zzdx8n 2494 2493 5 08:45:01 ttyp3 0:00 ps -ef
zzdx8n 2492 25134 0 08:45:01 ttyp3 0:00 ./t1
zzdx8n 2496 2492 1 08:45:02 ttyp3 0:00 sh -c ps -ef|grep zzdx8n >> t1.out
zzdx8n 2498 2496 0 08:45:02 ttyp3 0:00 grep zzdx8n
zzdx8n 2497 2496 2 08:45:02 ttyp3 0:00 ps -ef
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2004 02:37 AM
03-12-2004 02:37 AM
Re: How to Assign a Process to a Specific Processor
Your really have to do
a
first_id = mpctl(MPC_GETFIRSTSPU_SYS,(spu_t) 0,(pid_t) 0);
you then enter a loop using
curr_id = next_id = first_id
while (next_id >= 0)
{
next_id = mpctl(MPC_GETNEXTSPU_SYS,(spu_t) curr_id,(pid_t) 0);
if (next_id >= 0)
{
curr_id = next_id;
}
}
You really have to build up an array (or list) of vaslid id's rather than blindly sending in 4.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2004 03:21 AM
03-12-2004 03:21 AM
Re: How to Assign a Process to a Specific Processor
Thanks for your response. I'm not sure listing the SPU numbers helped, however, I'm convinced that the call is working properly. My SPUs are numbered 0-7, and the MCP_SETPROCESS_FORCE command is moving the process to another processor. The ps command may not have been showing the correct SPU number. When I used the top command, it showed the SPU that I expected. I also did a couple MCP_SETPROCESS_FORCE commands and saw the process move with the top command.
I had to remove the "_SYS" from your request argument to get it to compile.
Thanks again!
TOM