From: Albert Cahalan <albert@users.sf.net>
To: rwhite@casabyte.com
Cc: linux-kernel mailing list <linux-kernel@vger.kernel.org>
Subject: RE: setproctitle
Date: 18 Aug 2004 21:04:43 -0400 [thread overview]
Message-ID: <1092877482.5761.2029.camel@cube> (raw)
> What happens to all the little ps (etc.) programs
> when I munge together a *really* *long* title?
Obviously, ps prints a *really* *long* title.
I suppose, given enough tasks and ps options that
cause sorting, you could run ps out of memory.
> I'd prefer a setthreadtitle(char * new_title) such
> that the individual threads in a process (including
> the master thread, and so setproctitle() function
> is covered) could be re-titled to declare their
> purposes. It would make debugging and logging a
> lot easier and/or more meaningful sometimes. 8-)
You won't see this in ps output. To save memory
and avoid reading normally-redundant info, ps will
only read the cmdline data once for a process.
You can get the thread ID with "ps -efL", "ps -efT",
"ps -efLm", and so on. That's pretty good. Have it all:
ps -emostat,c,psr,rtprio,class,ppid,pid,tid,nlwp,wchan:9,args
> It would also let the system preserve the original
> invocation and args for the lifetime of the process
> to prevent masquerading. You know, by default the
> title is the args, but the set operation would
> build the new title in a new kernel-controlled
> place and move the pointer.
Now, this I like.
Solaris stores the first 80 bytes of argv in the
kernel. Modifications do not show up. HP-UX stores
the first 64 bytes, and in recent releases can
also supply a kilobyte of (modified?) argv.
next reply other threads:[~2004-08-19 3:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-19 1:04 Albert Cahalan [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-08-18 8:28 setproctitle DervishD
2004-08-18 8:58 ` setproctitle William Lee Irwin III
2004-08-18 21:21 ` setproctitle Robert White
2004-08-18 21:28 ` setproctitle William Lee Irwin III
2004-08-18 21:46 ` setproctitle Richard B. Johnson
2004-08-20 16:23 ` setproctitle 'DervishD'
2004-08-20 16:20 ` setproctitle DervishD
2004-08-20 16:33 ` setproctitle William Lee Irwin III
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1092877482.5761.2029.camel@cube \
--to=albert@users.sf.net \
--cc=linux-kernel@vger.kernel.org \
--cc=rwhite@casabyte.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox