- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Renaming a shell script's process name
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
09-12-2005 02:59 AM
09-12-2005 02:59 AM
The only way I know how to do this is to start it from a C program with a fudged exec() call. That's not nice. Is there any other easy way to do this?
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2005 03:05 AM
09-12-2005 03:05 AM
Re: Renaming a shell script's process name
would the following be enough?
root xxxx xxxx 11 17:03:42 pts/xx 0:00 /bin/sh ./change_timeout.sh
That's what I get when I call my change_timeout.sh which has an interpreter set in it's first line (#!/bin/sh).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2005 03:20 AM
09-12-2005 03:20 AM
Re: Renaming a shell script's process name
I can see it in "ps" as command-line options but top still shows only "ksh".
BTW I have the bang #!/bin/ksh at the top.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2005 03:21 AM
09-12-2005 03:21 AM
Re: Renaming a shell script's process name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2005 03:23 AM
09-12-2005 03:23 AM
Re: Renaming a shell script's process name
> shell script...so that your current
> shell's invocation is replaced by ksh???
Yes, since there is a bang at the start.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2005 03:26 AM
09-12-2005 03:26 AM
Re: Renaming a shell script's process name
thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2005 03:39 AM
09-12-2005 03:39 AM
Re: Renaming a shell script's process name
how about making a copy of ksh and name it "scriptwrap" or something else meaningful and then run your job/script from inside "scriptwrap" shell???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2005 04:18 AM
09-12-2005 04:18 AM
Solution$ cat testit
#!/home/bo/myshell
sleep 60
$ cd ~
$ ls -al myshell
lrwxr-x--- 1 bo users 8 Sep 12 11:06 myshell -> /bin/ksh
$ ./testit &
I just tried it, and it works great with the ps -ef | grep command combo
$ ps -ef | grep -v grep | grep myshell
bo 15716 15187 0 11:06:53 pts/4 0:00 /home/bo/myshell ./testit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2005 04:26 AM
09-12-2005 04:26 AM
Re: Renaming a shell script's process name
Thanks to everybody.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2005 04:26 AM
09-12-2005 04:26 AM