Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: timeout problem in ssh sessions
- X-seq: zsh-users 12624
- From: Andy Spiegl <zsh.Andy@xxxxxxxxx>
- To: ZSH User List <zsh-users@xxxxxxxxxx>
- Subject: Re: timeout problem in ssh sessions
- Date: Mon, 18 Feb 2008 11:27:29 +0100
- In-reply-to: <080215192616.ZM30010@xxxxxxxxxxxxxxxxxxxxxx>
- Kreccount: 1
- Mail-followup-to: ZSH User List <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20080213134200.GB31852@xxxxxxxxx> <200802131349.m1DDnXRF004831@xxxxxxxxxxxxxx> <27b8b8a0802130621x47568c7fo304848d02a1c6e76@xxxxxxxxxxxxxx> <20080213143803.GI619@xxxxxxxxxxxxxxxxxxx> <20080214125415.GC31852@xxxxxxxxx> <20080214180818.GO619@xxxxxxxxxxxxxxxxxxx> <20080215103220.GF31852@xxxxxxxxx> <080215123047.ZM29728@xxxxxxxxxxxxxxxxxxxxxx> <20080215221834.GA23684@xxxxxxxxx> <080215192616.ZM30010@xxxxxxxxxxxxxxxxxxxxxx>
On 2008-02-15, 19:26, Bart Schaefer wrote:
> } ps="$(/bin/grep -v 'etime,bsdtime,cmd' =(ps -eo user,pid,ppid,s,cpu,pmem,rss,vsize,bsdstart,etime,bsdtime,cmd))"
> }
> } Is that ok / efficient?
>
> There's no particular problem with it but I think it's unnecessary given
> the way you're filtering the output later. The "ps" command is a child
> of the subshell $(...), not of the login shell, so it will match neither
> the grep for $$ nor the grep for $PPID (nor for xsel, obviously).
Uhmm, no. Here the ps process is a direct child of the login shell:
Terminating shell (PID 26166) on TTY /dev/pts/16:
USER PID PPID S CPU %MEM RSS VSZ START ELAPSED TIME CMD
spiegl 26166 26163 S - 0.6 20292 23116 11:24 00:02 0:01 -zsh
spiegl 26245 26166 R - 0.0 944 2544 11:24 00:00 0:00 ps -eo user,pid,ppid,s,cpu,pmem,rss,vsize,bsdstart,etime,bsdtime,cmd
Thanks,
Andy.
--
You can't run sausage backwards through a meat grinder and end up with a
whole pig."
(Tim Peoples talking about the irreversability of UNIX password encoding)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author