- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: how can i get all process names and topcpu usi...
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
Discussions
Discussions
Forums
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
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
тАО02-11-2009 12:21 AM
тАО02-11-2009 12:21 AM
how can i get all process names and topcpu using c?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2009 12:56 AM
тАО02-11-2009 12:56 AM
Re: how can i get all process names and topcpu using c?
You don't need the process names in order to obtain various info.
Have a look at the system services $PROCESS_SCAN and $GETJPI in the System Services Reference Manual at:
http://h71000.www7.hp.com/doc/83final/4527/4527pro.html
However, you need to be priv'ed to obtain info about processes not running under your UIC.
Regards,
Kris (aka Qkcl)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2009 12:58 AM
тАО02-11-2009 12:58 AM
Re: how can i get all process names and topcpu using c?
I forgot...
If you're really adventurous have a look at QJPI at
http://www.quadratrix.be/qjpi.html
Regards,
Kris (aka Qkcl)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2009 08:31 AM
тАО02-11-2009 08:31 AM
Re: how can i get all process names and topcpu using c?
Arguments
pidadr
OpenVMS usage:process_id
type: longword (unsigned)
access: modify
mechanism: by 32- or 64-bit reference (Alpha)
mechanism: by 32-bit reference (VAX)
If you give pidadr the value -1, $GETJPI assumes a wildcard
operation and returns the requested information for each process
on the system that it has the privilege to access, one process
per call. To perform a wildcard operation, you must call $GETJPI
in a loop, testing for the condition value SS$_NOMOREPROC after
each call and exiting from the loop when SS$_NOMOREPROC is
returned.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2009 06:41 PM
тАО02-11-2009 06:41 PM
Re: how can i get all process names and topcpu using c?
i can not set the pdiadr to -1 just because it's unsigned ,how can i do this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2009 07:05 PM
тАО02-11-2009 07:05 PM
Re: how can i get all process names and topcpu using c?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2009 09:25 PM
тАО02-11-2009 09:25 PM
Re: how can i get all process names and topcpu using c?
Not your error! Sloppy parameter / dscription. It clearly indicates 'unsigned' and then tells you to put a -1 in there. Oh well.
Anyway... now that you figured it out, attached a ditty program to do a 'show process' with CSV output and CPU time columns for USER, EXEC and KERNEL.
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2009 09:28 PM
тАО02-11-2009 09:28 PM
Re: how can i get all process names and topcpu using c?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-12-2009 05:35 AM
тАО02-12-2009 05:35 AM
Re: how can i get all process names and topcpu using c?
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-12-2009 07:30 PM
тАО02-12-2009 07:30 PM
Re: how can i get all process names and topcpu using c?
I just download your codes and test it,
the following is the output :
"IOMASTER",13105,1,26,386,360,569,00000C18,8,$1$DGA1:[BKMASIC.][DATA.MASIC1.RELEASE]IOMASTER.EXE;26
here we can see that the kernel time is 13105,and EXECTIME is 1,and usertime is 26,but i wanted to get the cpu using percent of the system just like using
$MONITOR PROCESS/TOPCPU
00000C18 IOMASTER 20 ,
how can i do this?