- Community Home
- >
- Servers and Operating Systems
- >
- Legacy
- >
- Operating System - Tru64 Unix
- >
- Tru64 proc file system with ioctl call
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
тАО06-17-2009 04:01 AM
тАО06-17-2009 04:01 AM
Tru64 proc file system with ioctl call
In Linux, the process command line arguments can be accessed using /proc file system. Here, the file "/proc/
Thanks,
Roopa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2009 12:27 PM
тАО06-17-2009 12:27 PM
Re: Tru64 proc file system with ioctl call
% ps -e -o pid,ppid,cmd,args | grep xntpd
525367 524289 /usr/sbin/xntpd /usr/sbin/xntpd -g -x -c /etc/ntp.conf
843798 843880 grep xntpd grep xntpd
Martin
A quick resolution to technical issues for your HPE products is just a click away HPE Support Center
See Self Help Post for more details
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-18-2009 01:56 AM
тАО06-18-2009 01:56 AM
Re: Tru64 proc file system with ioctl call
I need to write a C application to get the command line arguments of a given process id.
But I do not want to rely on -
popen("ps -eo pid,args | grep
Thanks,
Roopa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-18-2009 03:27 AM
тАО06-18-2009 03:27 AM
Re: Tru64 proc file system with ioctl call
If you specify TBL_ARGUMENTS as the desired table, it should do just what you need:
"...This table contains all the command line arguments for the process. Specify the process id in the index argument. The addr argument points to a buffer into which the command line arguments are placed."
Martin
A quick resolution to technical issues for your HPE products is just a click away HPE Support Center
See Self Help Post for more details
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-22-2009 02:39 AM
тАО06-22-2009 02:39 AM
Re: Tru64 proc file system with ioctl call
/*
* Sample program to retrieve command line arguments of a running process
* on Tru64 using table() system call.
*/
#include
#include
#include
#define MAX_BUF_SIZE 1024
int main(int argc, char *argv[])
{
char arg_list[MAX_BUF_SIZE];
char *nextp = NULL;
int mypid = getpid();
int len = 0;
len = table(TBL_ARGUMENTS, mypid, arg_list, 1, MAX_BUF_SIZE);
if (len >= 0) {
nextp = arg_list;
while (nextp < arg_list + len) {
printf("%s\t", nextp);
nextp += strlen(nextp) + 1;
}
}
else {
perror("table");
}
return 0;
}
Thanks,
Roopa