- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- pstat_getproc PROBLEM...
Operating System - HP-UX
1819870
Members
2705
Online
109607
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
тАО12-06-2000 04:52 PM
тАО12-06-2000 04:52 PM
Has anyone seen problems with, or know of a patch that addresses problems with pstat_getproc on HP11?
The following code works great on one box (HP-UX hostdev B.11.00 A 9000/800 2001889088 two-user license), but not on another (HP-UX hpux-qa B.11.00 U 9000/800 151049638 unlimited-user license)
Code Sample:
int main(int argc, char *argv[])
{
struct pst_status pst;
int target = (int)getppid();
memset((void*)&pst, 0, sizeof(pst));
if(argc>1) target = atoi(argv[1]);
if (pstat_getproc(&pst, sizeof(pst), (size_t)0, target) != -1)
{
printf("Parent started at %s", ctime(&pst.pst_start));
printf("Basename: '%s'\n", pst.pst_ucomm);
printf("Commandline: '%s'\n", pst.pst_cmd);
}
else
{
printf("errno: %i\n", errno);
perror("pstat_getproc");
}
return 0;
}
On the U 9000/800 151049638 box I get the following error message:
errno: 72
pstat_getproc: Value too large to be stored in data type
It works perfectly on the other HP 11 box, giving me:
./myps.hp11
Parent started at Wed Dec 6 17:48:08 2000
Basename: 'bash'
Commandline: 'bash'
Thanks in advance for any help you can offer.
P.S. > The header file which defined pst_status has not changed.
The following code works great on one box (HP-UX hostdev B.11.00 A 9000/800 2001889088 two-user license), but not on another (HP-UX hpux-qa B.11.00 U 9000/800 151049638 unlimited-user license)
Code Sample:
int main(int argc, char *argv[])
{
struct pst_status pst;
int target = (int)getppid();
memset((void*)&pst, 0, sizeof(pst));
if(argc>1) target = atoi(argv[1]);
if (pstat_getproc(&pst, sizeof(pst), (size_t)0, target) != -1)
{
printf("Parent started at %s", ctime(&pst.pst_start));
printf("Basename: '%s'\n", pst.pst_ucomm);
printf("Commandline: '%s'\n", pst.pst_cmd);
}
else
{
printf("errno: %i\n", errno);
perror("pstat_getproc");
}
return 0;
}
On the U 9000/800 151049638 box I get the following error message:
errno: 72
pstat_getproc: Value too large to be stored in data type
It works perfectly on the other HP 11 box, giving me:
./myps.hp11
Parent started at Wed Dec 6 17:48:08 2000
Basename: 'bash'
Commandline: 'bash'
Thanks in advance for any help you can offer.
P.S. > The header file which defined pst_status has not changed.
"The glory of God is intelligence..."
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-07-2000 02:42 AM
тАО12-07-2000 02:42 AM
Solution
Haven't seen it before.
Check if the following can help you further:
http://devresource.hp.com/CXX/Forums/hpux-devtools/hpux-devtools.0003/0004.html
Check if the following can help you further:
http://devresource.hp.com/CXX/Forums/hpux-devtools/hpux-devtools.0003/0004.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-07-2000 06:44 AM
тАО12-07-2000 06:44 AM
Re: pstat_getproc PROBLEM...
Thank you... This lead me in a round about way to find the answer... If you compile with -D_PSTAT64 it will work on both systems.
"The glory of God is intelligence..."
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP