<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.1.16">
</HEAD>
<BODY>
On Tue, 2004-07-27 at 21:22 +0100, Kevin wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">This is a question for any Solaris/Linux admins.</FONT>

<FONT COLOR="#000000">What (if any) are the Linux equivalents to the following Solaris commands:</FONT>

<FONT COLOR="#000000">1) pargs (Print process arguments, environmental variables, etc)</FONT>
</PRE>
</BLOCKQUOTE>
cat /proc/$pid/cmdline (the separator is 0x00... so cat might not be enough as it shows both the exe name and the arguments)<BR>
cat /proc/$pid/environ (the separator is 0x00... so cat might not be enough as the environment variables are separated by a 0x00)
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">2) pcred (Display process credentials)</FONT>
</PRE>
</BLOCKQUOTE>
have no ideea what it does... you mean the user it runs under? chroot?<BR>
cat /proc/$pid/status | grep Uid //this is for the UID<BR>
ls -la /proc/$pid/ | grep root //this shows the chroot and it's a symlink to the root dir of the program
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">3) pfiles (Display open file info)</FONT>
</PRE>
</BLOCKQUOTE>
cat /proc/$pid/maps
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">4) pldd (List dynamic libs associated to process)</FONT>
</PRE>
</BLOCKQUOTE>
ldd /proc/$pid/exe
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">5) pwdx (Display current working directory for process)</FONT>
</PRE>
</BLOCKQUOTE>
ls -la /proc/$pid/ | grep cwd //cwd is a symlink to the current working directory<BR>
<BR>
<BR>
<BR>
For most of these things you have lsof and ps with their options.
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">Thanks</FONT>
<FONT COLOR="#000000">  Kevin</FONT>


</PRE>
</BLOCKQUOTE>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
R&#259;zvan Corneliu VILT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; e-mail:<U><A HREF="mailto:razvan.vilt@linux360.ro">razvan.vilt@linux360.ro</A></U><BR>
GPG:<U><A HREF="http://d3vi1.linux360.ro/public-keys/">http://d3vi1.linux360.ro/public-keys/</A></U>&nbsp;www: <U><A HREF="http://d3vi1.linux360.ro/">http://d3vi1.linux360.ro/</A></U><BR>
<BR>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>