Truss output

Hi,

I want to trace a background java program which runs in infinite loop. I have used truss command for this.

But the program terminated after some hours with below truss output:

Received signal #1, SIGHUP, in lwp_cond_wait() [caught]
/1:           siginfo: SIG#0

Please let me know what is the meaning of this.

Thanks
Hara Prasad

What's your OS? Solaris?

Truss only captures system calls the process makes. If the code that is looping doesn't make any system calls, it won't produce any truss output.

There is also truss on AIX. You should monitor the resources consumed by this process. Could be a ulimit issue. Is there a javacore file?

Thanks for the reply.

OS is SunOS.

Java program is:

 public void run()
        {
          try
            {
                  String workingDir = System.getProperty("user.dir");
                  while(true)
                  {
                        Runtime.getRuntime().exec(workingDir+"/archiving_receivinglogs.sh");
                        Runtime.getRuntime().exec(workingDir+"/Purging_Logs.sh");
                        Thread.sleep(900000);
                  }
            }

above program, terminates after 3-4 hrs.

You can't easily truss a java process as you are seeing the JVM's system calls, not the java code within.

That said, the message you are seeing is saying that the HANGUP (HUP) signal was received - you can shield a process from HUP signals (this used to be very important back in the old unreliable days of modem connections that would routinely vanish) by starting you process via 'nohup'
eg

nohup java -Dblahblah

you could convert what you are doing in your shell script to Java, and do away with the extra "overheads"