Home > Archive > Unix Programming > March 2007 > who raised the signal
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
who raised the signal
|
|
|
| Hi All,
It may sound silly, but is there any way to know the source of signal?
Actually, my application(daemon) is getting SIGHUP. It was not raised
manually and also not by my other applications also.
can it be becuse of faulty HW also? I am using Netra 240 with Solaris
10.
Thanks in advance
| |
| James Carlson 2007-03-23, 7:04 pm |
| "None" <kushal.singh@gmail.com> writes:
> It may sound silly, but is there any way to know the source of signal?
>
> Actually, my application(daemon) is getting SIGHUP. It was not raised
> manually and also not by my other applications also.
SIGHUP is normally generated by having your controlling tty hanging
up. Is that possible here?
> can it be becuse of faulty HW also?
Not likely, but I suppose it's remotely possible. Why do you suspect
that?
> I am using Netra 240 with Solaris
> 10.
Try using "truss -t\!all" to find the source of the signal. You
should get output like this:
Received signal #1, SIGHUP, in read() [default]
siginfo: SIGHUP pid=12466 uid=108472
The "pid=" shows what process sent the signal, and the "uid=" shows
the user who did it.
Another suggestion is to look into dtrace. You can get much finer
granularity information from it, and there's extensive documentation
available.
--
James Carlson, Solaris Networking <james.d.carlson@sun.com>
Sun Microsystems / 1 Network Drive 71.232W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677
| |
| Bin Chen 2007-03-26, 4:07 am |
| On 3=D4=C224=C8=D5, =C9=CF=CE=E71=CA=B124=B7=D6, James Carlson <james.d.car=
l=2E..@sun.com> wrote:
> "None" <kushal.si...@gmail.com> writes:
>
>
> SIGHUP is normally generated by having your controlling tty hanging
> up. Is that possible here?
>
>
> Not likely, but I suppose it's remotely possible. Why do you suspect
> that?
>
>
> Try using "truss -t\!all" to find the source of the signal. You
> should get output like this:
>
> Received signal #1, SIGHUP, in read() [default]
> siginfo: SIGHUP pid=3D12466 uid=3D108472
>
> The "pid=3D" shows what process sent the signal, and the "uid=3D" shows
> the user who did it.
>
> Another suggestion is to look into dtrace. You can get much finer
> granularity information from it, and there's extensive documentation
> available.
Is there any alternatives can used in Linux?
| |
| James Carlson 2007-03-26, 8:29 am |
| "Bin Chen" <binary.chen@gmail.com> writes:
> On 3月24日, 上午1时24分, James Carlson <james.d.carl...@sun.com> wrote:
> Is there any alternatives can used in Linux?
The original poster was using Solaris.
The unhelpful answer would be that Linux isn't UNIX. ;-}
I think that something like "strace -e trace=none" would do the job on
Linux, at least for getting the signal information. I think the rough
equivalent for dtrace in Linux is something called "SystemTap," but I
know even less about the state of that project.
--
James Carlson, Solaris Networking <james.d.carlson@sun.com>
Sun Microsystems / 1 Network Drive 71.232W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677
| |
| Mark Hobley 2007-03-26, 8:29 am |
| Bin Chen <binary.chen@gmail.com> wrote:
> Is there any alternatives can used in Linux?
strace
Regards,
Mark.
--
Mark Hobley
393 Quinton Road West
QUINTON
Birmingham
B32 1QE
Telephone: (0121) 247 1596
International: 0044 121 247 1596
Email: markhobley at hotpop dot donottypethisbit com
http://markhobley.yi.org/
|
|
|
|
|