On 9/26/07, Peter Tribble <[EMAIL PROTECTED]> wrote: > On 9/26/07, Nicolas Williams <[EMAIL PROTECTED]> wrote: > > On Wed, Sep 26, 2007 at 09:52:29PM +0100, Peter Tribble wrote: > > > Isn't this as easy as changing the format specifier from %8.8s to %8s? > > > > > > OK, so then the columns don't line up. How much is this a problem? > > > > It's a big problem. > > Bigger than giving completely incorrect output?
I agree that it is a bug. Names of zones, users, groups, projects, etc. should not be truncated unless the command allows me to specify the column width. I get what I deserve if I tell a command to be imprecise but the precision is important. > > Personally, I think ps needs an option to output > > non-column oriented text. > > OK, so I need to work out how wide the column should be > and expand it to suit? Don't worry about the alignment. Sure it will be ugly, but ugly is better than wrong. Take vmstat, df, or any number of other commands as a precedent. I stopped using sar at a time when all the numbers started running together and I could no longer trust that the output was correct. > > In the meantime you can use ptree(1) and friends instead of ps(1) and > > avoid the problem, I think. > > I'm not sure how that helps. The question I wanted ps to give > me the answer to was simple: show me what processes a user > is running, and add on which zone they're in so I know which > zones are in use. Now, 'ps -flZ -u fred' would seem to be the > ideal command to use, but due to this bug it isn't. How about a variant of: ps -o zone,user,pid,args -u fred This may produce ugly yet correct output (assuming that all zones use the same name service - may break anyway if ps is "too smart"). You can adjust the columns to match the -flZ output if desired. -- Mike Gerdts http://mgerdts.blogspot.com/ _______________________________________________ zones-discuss mailing list email@example.com