Solaris / OpenSolarisThis forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have been searching for alternative of stat command in Sun os. Can anybody help me to know how can I get process start time (I want it for older processes which are running for more than 15 days, hence ps and related options arent giving me expected result) or any option to find modification time since last epoch.
As I am not much familier with perl scrpting I would really appreciate if any body can help me to get this.
yes, I am going to use /proc/$PID but I need to get the stat of that process. SInce I am on Sun Os I directly cant execute stat ("/proc/$pid"). only /proc/$PID wont give me exact process start time. Any other way to get start time of process will aslo work..
Thanks in tons!! Indeed its giving me output but I am not able to illustrate it. Could you please explain it in bit details for me.
If this is what giving me the process start time, you really made my life far better...
Some how I am not able to grep the output of this turss... I have tried to get it in all way but some how I am not able to do it.. Can you please let me know how can I get only ct value stored in variable? I have tried using awk, sed but still not able to cut and store this value.. Can you help in this as well??
as far as I remember truss writes its output to stderr, so you need to redirect it to stdout:
truss .... 2>&1 | grep ... or awk ...
probably you only missed a space before 2
ohh.. yes.. Got it.. I have looped several servers and ssh'ing those and executing truss on every one of them. Let me try how I can go to bash shell after ssh and then excute truss..
A big big thanks again!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.