- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- renaming launched process
Operating System - HP-UX
1754862
Members
5745
Online
108827
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
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
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
02-18-2003 08:05 AM
02-18-2003 08:05 AM
Hello,
I would like to rename a process launched (just before launching it) in a shell script. In order for this process to appear in the ps command with the renamed ocuurence. Ex:
A process named /usr/sbin/toto.sh to appear like tata under the p^s command.
Is this possible????
Thanks in advance
Regards
Jerome
I would like to rename a process launched (just before launching it) in a shell script. In order for this process to appear in the ps command with the renamed ocuurence. Ex:
A process named /usr/sbin/toto.sh to appear like tata under the p^s command.
Is this possible????
Thanks in advance
Regards
Jerome
J@Y
Solved! Go to Solution.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2003 08:27 AM
02-18-2003 08:27 AM
Solution
I had to create a small "c" program to call "execl". The program then launched the desired program with my altered name.
Sample-
sprintf( cdentry, PATH, argv[1]);
sprintf( uvname, "%s '* %s'",UVNAME,argv[1]);
x = chdir(cdentry);
if ( x != 0 ) {
fprintf(stderr, "%s not a valid directory\n", argv[1]);
exit(2);
}
x = execl ( CMD , uvname, ARG1, ARG2, (char *)NULL);
perror(" Error from execl\n");
"uvname" has the name I want to appear on "ps" lists. (This program can be compiled with the brain-damaged "c" compiler HP provides).
HTH
-- Rod Hills
Sample-
sprintf( cdentry, PATH, argv[1]);
sprintf( uvname, "%s '* %s'",UVNAME,argv[1]);
x = chdir(cdentry);
if ( x != 0 ) {
fprintf(stderr, "%s not a valid directory\n", argv[1]);
exit(2);
}
x = execl ( CMD , uvname, ARG1, ARG2, (char *)NULL);
perror(" Error from execl\n");
"uvname" has the name I want to appear on "ps" lists. (This program can be compiled with the brain-damaged "c" compiler HP provides).
HTH
-- Rod Hills
There be dragons...
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.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP