[ale] Need help from cammand line and scripting gurus

John Wells jbwellsiv at yahoo.com
Wed Feb 27 11:32:33 EST 2002


Simply put.  Solaris's proc info support sucks.  I ran
in to this awhile back and put it on the back burner
until I get more time.

It's not a matter of your terminal not displaying 80+
characters.   The problem is that Solaris maintains a
limited amount of information about a process that's
available to the user.  Cd into /proc/<pid> and do a
"strings psinfo" to see the same limited command
string.

I'm no solaris expert, so there may be a way.  I guess
the big question is whether the kernel maintains any
other accessible data structures for the pid.  Someone
please correct me if I'm wrong here, but it would seem
that after the initial execution of the process there
would really be no need to maintain an ascii
representation of the command that spawned it except
for the sole purpose of providing more detail to a
user or another process.  

It's problems like this that make me thank God that
there's such a thing called linux ;-)...

John


John
--- Geoffrey <esoteric at 3times25.net> wrote:
> Or possibly pass the output of ps to 'cut -c40-' so
> that you can skip 
> some of the info you're not wanting.  40 was an
> arbitrary selection by 
> the way.  Is it possible your term's not wrapping
> the output?
> 
> Ken Nagorski wrote:
> > Hi there,
> > 
> > really this is Solaris question however I did a
> `ps -ef` on a sun box here	
> > are work and this is one od the processes
> > root   377     1  0   Feb 01 console  0:00
> /usr/lib/saf/ttymon -g -h -p
> > atlmail console login:  -T sun -d /dev/console -l
> > 
> > Looks likw more than 80 chars? Also did you try
> grepping it? It might only
> > display 80 chars however grep might still get the
> info you want...
> > 
> > ps -ef | grep <some_string>
> > 
> > Thanks
> > Ken
> > 
> > 
> > 
> >>Hi,
> >>
> >>here is where I am stuck:
> >>os - SunOS xxxx 5.8 Generic_108528-09 sun4u sparc
> SUNW,Ultra-4
> >>the task - I need to make sure that one process is
> alive and running.
> >>The problem is that it is a java process and there
> are a lot of those
> >>running on the box, so the only way to tell is to
> look at the start
> >>class which is passed in as a param to java. ps
> display only 80 chars
> >>whic is not enough
>
>>"/bin/../java/bin/../jre/bin/../bin/sparc/native_threads/java
> >>-Dbeanfactory.cfg="
> >>how do I do it? This will be launched from a
> script periodicly to check
> >>and restart the process. Only standart tools can
> be used... since I
> >>have no way of getting anything installed on those
> production servers
> >>:(
> >>
> >>thanks,
> >>Tomas
> >>
> >>---
> >>This message has been sent through the ALE general
> discussion list. See
> >>http://www.ale.org/mailing-lists.shtml for more
> info. Problems should
> >>be  sent to listmaster at ale dot org.
> >>
> > 
> > 
> > 
> > 
> > ---
> > This message has been sent through the ALE general
> discussion list.
> > See http://www.ale.org/mailing-lists.shtml for
> more info. Problems should be 
> > sent to listmaster at ale dot org.
> > 
> > 
> > 
> 
> 
> -- 
> Until later: Geoffrey		esoteric at 3times25.net
> 
> I didn't have to buy my radio from a specific
> company to listen
> to FM, why doesn't that apply to the Internet
> (anymore...)?
> 
> 
> ---
> This message has been sent through the ALE general
> discussion list.
> See http://www.ale.org/mailing-lists.shtml for more
> info. Problems should be 
> sent to listmaster at ale dot org.
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - Send FREE e-cards for every occasion!
http://greetings.yahoo.com

---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list