Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1] 2 3

Author Topic: HG612 modem stats - multiple instances v2 - halts DSLstats  (Read 13672 times)

kitz

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 33888
  • Trinity: Most guys do.
    • http://www.kitz.co.uk
HG612 modem stats - multiple instances v2 - halts DSLstats
« on: October 21, 2013, 08:51:59 PM »

Im starting a new thread as I dont want to clutter up the band plan changes thread,

but in there chrysalis mentioned about multiple instances of HG612 stats and I said Id been fine since the Sept updates...  blaaaaaaaaahh  ....
I spoke too soon.   For some reason ongoing is running failed this morning at about 6am.




As Ive only just noticed this has created lots of the ongoing-isrunning.text files (appx 1500).

Ive cleared these out, and manually closed down the rogue item in task manager.

Ive also noticed that this has completely stopped DSLstats running too as I have hundreds of these in the DslStat log files.   Obviously neither program has been logging today.

Quote
21 Oct 2013 14:07:35   1 instance(s) of HG612_stats.exe running, sample missed
21 Oct 2013 14:08:35   1 instance(s) of HG612_stats.exe running, sample missed

BE - am I dreaming in that if an existing copy of HG612_stats was running then it was supposed to delete it.
Im asking because this also now stops dslstats from running too.

Quote
***********************************************************************************
21/10/2013 20:30:00.37 - In [HG612_stats.exe] - At the start of the main() function
21/10/2013 20:30:00.55 - There are 2 instances of HG612_stats.exe running. Status = 0,
21/10/2013 20:30:01.42 - ONGOING-ISRUNNING-203000-794.TXT - *** In exit_2_instances - Closing ERROR.LOG. Status = 1,



About to install the beta version in a mo
Logged
Please do not PM me with queries for broadband help as I may not be able to respond.
-----
How to get your router line stats :: ADSL Exchange Checker

Bald_Eagle1

  • Helpful
  • Kitizen
  • *
  • Posts: 2721
Re: HG612 modem stats - multiple instances v2 - halts DSLstats
« Reply #1 on: October 22, 2013, 12:01:08 AM »

Do you have any very recent Plink logs at hand?

It does seem likely that your modem's firmware may now have been updated.

A simple confirmation check is if you can no longer access the modem's GUI.

Logged

kitz

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 33888
  • Trinity: Most guys do.
    • http://www.kitz.co.uk
Re: HG612 modem stats - multiple instances v2 - halts DSLstats
« Reply #2 on: October 22, 2013, 03:17:43 AM »

Quote
Do you have any very recent Plink logs at hand?

Yes, its been running fine again since I cleared out task manager.  Last scheduled current stats ran at was 10pm this evening.

Do you want the full Plink, or does this tell you all you need to know?

Quote
Retrain Reason:   0
Max:   Upstream rate = 32193 Kbps, Downstream rate = 95400 Kbps
Path:   0, Upstream rate = 20000 Kbps, Downstream rate = 79999 Kbps

Discovery Phase (Initial) Band Plan
US: (0,95) (880,1195) (1984,2771)
DS: (32,859) (1216,1959) (2792,4083)
Medley Phase (Final) Band Plan
US: (0,95) (880,1195) (1984,2771)
DS: (32,859) (1216,1959) (2792,4083)

DSL Link time = 43 days 6 hours 19 min 47 sec

 

I can still access the GUI
Logged
Please do not PM me with queries for broadband help as I may not be able to respond.
-----
How to get your router line stats :: ADSL Exchange Checker

kitz

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 33888
  • Trinity: Most guys do.
    • http://www.kitz.co.uk
Re: HG612 modem stats - multiple instances v2 - halts DSLstats
« Reply #3 on: October 22, 2013, 03:18:26 AM »

This is from the error log...  you can see the scheduled 6am run, which was the last time it worked until I reset everything at just before 9am


Current_ERROR.LOG

Code: [Select]

21/10/2013 06:00:13.462 - Snapshot graphs should now have been plotted
21/10/2013 06:00:13.462 - End of HG612_current_stats.exe program, closing ERROR.LOG


21/10/2013 20:53:00.349 - Start of Current Stats Harvesting
21/10/2013 20:53:00.403 - From IsRunningVB.exe, HG612_stats.exe was running 1 instances.


21/10/2013 20:53:24.068 - Start of Current Stats Harvesting
21/10/2013 20:53:24.193 - The program full path is      C:\Users\kitz\Desktop\Connection\HG612_Modem_Stats\Scripts\HG612_current_stats.exe


Graph6 error log
Code: [Select]
21/10/2013 06:00:13.446 - The Plink log being used came from a RESYNC or SCHEDULED event, so any pauses were disabled
21/10/2013 06:00:13.446 - End of GRAPH6.exe program, closing ERROR.LOG


21/10/2013 20:53:40.545 - Start of GRAPH6.exe        <------------  me doing a manual run
21/10/2013 20:53:40.545 - The program full path is      C:\Users\kitz\Desktop\Connection\HG612_Modem_Stats\Scripts\GRAPH6.exe


ok...  after lots of scrolling found the exact time it stopped recording.  There is nothing at 07:13 at all
ERROR,LOG
Code: [Select]
21/10/2013 07:12:06.670 - Sync speeds have NOT changed since the previous data harvest
21/10/2013 07:12:06.670 - ONGOING-ISRUNNING-071200-539.TXT DELETED
*********************************************************************************************************************
21/10/2013 07:12:06.670 - Scheduled Current_Stats logging is switched ON via the ini file
21/10/2013 07:12:06.670 - Current_Stats_Datum    = 06
21/10/2013 07:12:06.670 - Current_Stats_Interval = 8
21/10/2013 07:12:06.685 - (Time in Hours - Datum) Modulus Interval       i.e. (7 - 6) % 8 = 1
21/10/2013 07:12:06.685 - (Time in Minutes) = 12
21/10/2013 07:12:06.685 - Modulus & minutes *BOTH* have to be zero, so scheduled snapshot logging is NOT due yet
*********************************************************************************************************************
21/10/2013 07:12:06.685 - Scheduled Daily_Graphing is switched ON via the ini file
21/10/2013 07:12:06.685 - Daily_Graphing_hour    = 23
21/10/2013 07:12:06.685 - Daily_Graphing_minutes = 58
21/10/2013 07:12:06.685 - Current Time is Hours 07, Minutes 12
21/10/2013 07:12:06.685 - scheduled Daily_Graphing is NOT due yet
*********************************************************************************************************************
21/10/2013 07:12:06.685 - End of HG612_stats.exe program, EXIT error code = 0
21/10/2013 07:12:06.685 - End of HG612_stats.exe program, closing ERROR.LOG


21/10/2013 07:14:00.488 - [ IN HG612_stats.EXE ] - Start of 1 minute sampling
21/10/2013 07:14:00.550 - HG612_current_stats.exe was NOT running
21/10/2013 07:14:00.550 - Temp File ONGOING-ISRUNNING-071400-550.TXT was created
21/10/2013 07:14:00.737 - *** Now in exit_2_instances as there are 2 instances of HG612_stats.exe running. Status = 1.
21/10/2013 07:14:00.753 - *** In exit_2_instances - Closing ERROR.LOG. Status = 1.


21/10/2013 07:15:00.470 - [ IN HG612_stats.EXE ] - Start of 1 minute sampling
21/10/2013 07:15:00.548 - HG612_current_stats.exe was NOT running
21/10/2013 07:15:00.548 - Temp File ONGOING-ISRUNNING-071500-548.TXT was created
21/10/2013 07:15:00.735 - *** Now in exit_2_instances as there are 2 instances of HG612_stats.exe running. Status = 1.
21/10/2013 07:15:00.751 - *** In exit_2_instances - Closing ERROR.LOG. Status = 1.


I found the corresponding time in DSLstats logs

Code: [Select]
21 Oct 2013 01:40:48 Auto snapshots taken
21 Oct 2013 03:40:49 Auto snapshots taken
21 Oct 2013 05:41:49 Auto snapshots taken
21 Oct 2013 07:12:39 Second stage login failed
21 Oct 2013 07:13:35 1 instance(s) of HG612_stats.exe running, sample missed
21 Oct 2013 07:14:35 1 instance(s) of HG612_stats.exe running, sample missed
21 Oct 2013 07:15:35 1 instance(s) of HG612_stats.exe running, sample missed
21 Oct 2013 07:16:35 1 instance(s) of HG612_stats.exe running, sample missed
Logged
Please do not PM me with queries for broadband help as I may not be able to respond.
-----
How to get your router line stats :: ADSL Exchange Checker

kitz

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 33888
  • Trinity: Most guys do.
    • http://www.kitz.co.uk
Re: HG612 modem stats - multiple instances v2 - halts DSLstats
« Reply #4 on: October 22, 2013, 03:21:42 AM »

So to summarise by combining both HG612 and DSLstats error logs

21/10/2013 07:12:06. HG612_stats.exe successfully ran
21 Oct 2013 07:12:39  DSLstats failed with the error message "Second stage login failed"
21/10/2013 07:13:xx  HG612 stats didnt run properly -  caused a stuck instance of HG612_stats in task manager.
21 Oct 2013 07:13:35  DSLstats fails due to 1 instance(s) of HG612_stats.exe running, sample missed
21/10/2013 07:14:00  HG612_stats fails due to In exit_2_instances - Closing ERROR.LOG. Status = 1


Both programs now loop for the next 14hrs neither recording, because both see the stuck instance of HG612_stats.

Ive no idea why HG612_modem stats didnt run at 07:13 nor why nothing is in the logs for it..  however the clue may be at 07:12 when DSLstats records 2nd stage login failed.   

Eric can perhaps confirm what exactly this means, but Im guessing something else stopped DSLstats from being able to access the busybox shell.
Logged
Please do not PM me with queries for broadband help as I may not be able to respond.
-----
How to get your router line stats :: ADSL Exchange Checker

Bald_Eagle1

  • Helpful
  • Kitizen
  • *
  • Posts: 2721
Re: HG612 modem stats - multiple instances v2 - halts DSLstats
« Reply #5 on: October 22, 2013, 07:08:51 AM »


Yes, its been running fine again since I cleared out task manager.  Last scheduled current stats ran at was 10pm this evening.

Do you want the full Plink, or does this tell you all you need to know?

Retrain Reason:   0
Max:   Upstream rate = 32193 Kbps, Downstream rate = 95400 Kbps
Path:   0, Upstream rate = 20000 Kbps, Downstream rate = 79999 Kbps

Discovery Phase (Initial) Band Plan
US: (0,95) (880,1195) (1984,2771)
DS: (32,859) (1216,1959) (2792,4083)
Medley Phase (Final) Band Plan
US: (0,95) (880,1195) (1984,2771)
DS: (32,859) (1216,1959) (2792,4083)

DSL Link time = 43 days 6 hours 19 min 47 sec

 

That confirms the modem's firmware hasn't been updated yet.
It also confirms that stage 1 (initial DSLAM band pland change) hasn't occurred yet.


Are you now running all of the beta programs?

Logged

Bald_Eagle1

  • Helpful
  • Kitizen
  • *
  • Posts: 2721
Re: HG612 modem stats - multiple instances v2 - halts DSLstats
« Reply #6 on: October 22, 2013, 07:26:53 AM »


Both programs now loop for the next 14hrs neither recording, because both see the stuck instance of HG612_stats.

Ive no idea why HG612_modem stats didnt run at 07:13 nor why nothing is in the logs for it..  however the clue may be at 07:12 when DSLstats records 2nd stage login failed.   

Eric can perhaps confirm what exactly this means, but Im guessing something else stopped DSLstats from being able to access the busybox shell.


Hopefully this was a one-off.

We thought that previous changes to both DSLStats & HG612_stats had fully dealt with potential clashes.

However, IF DSLStats was still logged in following the failed login at 07:12:39, HG612_stats would have waited for a while, possibly causing DSLStats to pause, which in turn could have started a circle of each program waiting for the other to complete.

I suppose it is possible that something else was logged in to the modem using up its capacity, or one of our programs hadn't logged out properly & the login hadn't timed out when either of our programs attempted to login again?

I had started to remove the login debugging messages, but there MAY still be a clue in Login_events.TXT (in the Scripts folder).


Please let us know if this happens again.
I could always add the full login debugging messages again, if necessary.

Logged

kitz

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 33888
  • Trinity: Most guys do.
    • http://www.kitz.co.uk
Re: HG612 modem stats - multiple instances v2 - halts DSLstats
« Reply #7 on: October 22, 2013, 07:45:30 AM »

That confirms the modem's firmware hasn't been updated yet.
It also confirms that stage 1 (initial DSLAM band pland change) hasn't occurred yet.

Are you now running all of the beta programs?

Yes I thought so too, it was one of the things I checked first when I realised HG612_stats and DSLstats had stopped recording.
Thought it was just the band frequencies you wanted to see rather than the full plink. 

Yes I installed them all last night.
Logged
Please do not PM me with queries for broadband help as I may not be able to respond.
-----
How to get your router line stats :: ADSL Exchange Checker

kitz

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 33888
  • Trinity: Most guys do.
    • http://www.kitz.co.uk
Re: HG612 modem stats - multiple instances v2 - halts DSLstats
« Reply #8 on: October 22, 2013, 08:01:46 AM »


Hopefully this was a one-off.

We thought that previous changes to both DSLStats & HG612_stats had fully dealt with potential clashes.

However, IF DSLStats was still logged in following the failed login at 07:12:39, HG612_stats would have waited for a while, possibly causing DSLStats to pause, which in turn could have started a circle of each program waiting for the other to complete.

I suppose it is possible that something else was logged in to the modem using up its capacity, or one of our programs hadn't logged out properly & the login hadn't timed out when either of our programs attempted to login again?

I had started to remove the login debugging messages, but there MAY still be a clue in Login_events.TXT (in the Scripts folder).


Please let us know if this happens again.
I could always add the full login debugging messages again, if necessary.

Was I dreaming that HG612_stats was supposed to clear out any surplus instances in task manager if it detected it?

I'm also wondering about DSLstats too.  This also now checks if theres an instance of HG612_stats running and will cease if it finds one.
Previously if HG612_stats got into the 'running process' loop, at least dslstats would continue recording..  but now they will both stop.   

In this scenario there is no reason why DSLstats should stop recording, HG612stats is just stuck. DSLstats still should be able to successfully log in and obtain stats from the shell.

I can think of 2 possible solutions but dont know how possible they are to implement

1) HG612_stats

When it gets the following message returned, it deletes all running HG612_stat processes
There are 2 instances of HG612_stats.exe running. Status = 0
By the time its reached that point its obviously stuck and will continue to loop

2) DSLstats.

If DSL stats receives the following error say 5 or 10 times in a row in the error log, then it realises that HG612_stats is stuck in a loop .. so its ok to login in to get stats.
1 instance(s) of HG612_stats.exe running, sample missed
That way at most only 10 mins is lost rather than a whole day.


Relevant period from Login_events.TXT as requested :)

Code: [Select]
***********************************************************************************
21/10/2013  7:12:00.36 - In [HG612_stats.exe] - At the start of the main() function
21/10/2013  7:12:00.43 - There are 1 instances of HG612_stats.exe running. Status = 0,
21/10/2013  7:12:01.42 - **** [HG612_stats.exe] - reply(display login) O.K. Status = 1.
21/10/2013  7:12:02.13 - **** [HG612_stats.exe] - get_login_data() OK! Status = 1.
=============================

User Name     : admin

Login IP      : 192.168.1.10

Login Time    : 2013-10-21 07:11:57

Login TimeLen :


21/10/2013  7:12:06.70 - Normal End of [HG612_stats.exe]
**********************************************************************************


***********************************************************************************
21/10/2013  7:13:00.38 - In [HG612_stats.exe] - At the start of the main() function
21/10/2013  7:13:00.45 - There are 1 instances of HG612_stats.exe running. Status = 0,


***********************************************************************************
21/10/2013  7:14:00.36 - In [HG612_stats.exe] - At the start of the main() function
21/10/2013  7:14:00.42 - There are 2 instances of HG612_stats.exe running. Status = 0,
21/10/2013  7:14:00.75 - ONGOING-ISRUNNING-071400-550.TXT - *** In exit_2_instances - Closing ERROR.LOG. Status = 1,


***********************************************************************************



Logged
Please do not PM me with queries for broadband help as I may not be able to respond.
-----
How to get your router line stats :: ADSL Exchange Checker

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43614
  • Penguins CAN fly
    • DSLstats
Re: HG612 modem stats - multiple instances v2 - halts DSLstats
« Reply #9 on: October 22, 2013, 08:13:29 AM »

Quote
Ive no idea why HG612_modem stats didnt run at 07:13 nor why nothing is in the logs for it..  however the clue may be at 07:12 when DSLstats records 2nd stage login failed.   

Eric can perhaps confirm what exactly this means, but Im guessing something else stopped DSLstats from being able to access the busybox shell.

Specifically, it means that the telnet login was successful but for some reason the 'sh' command didn't get the expected response. When it happens, the telnet link is disconnected. I guess it's not impossible that whatever it was that stopped the 'sh' command from functioning could also stop the disconnect from working. I could add an extra check on that.

I do see that event log entry here very occasionally, but as it just means one occasional missing sample I haven't given it a lot of attention. I'll have a bit more of a ponder.

Quote
2) DSLstats.

If DSL stats receives the following error say 5 or 10 times in a row in the error log, then it realises that HG612_stats is stuck in a loop .. so its ok to login in to get stats.
1 instance(s) of HG612_stats.exe running, sample missed
That way at most only 10 mins is lost rather than a whole day.

This is something I've been considering, and I'll implement it in the next release.
Logged
  Eric

Chrysalis

  • Content Team
  • Addicted Kitizen
  • *
  • Posts: 7409
  • VM Gig1 - AAISP CF
Re: HG612 modem stats - multiple instances v2 - halts DSLstats
« Reply #10 on: October 22, 2013, 07:36:47 PM »

in my case kitz I didnt actually have duplicate processes running just the 1000s of txt files.

my issue is also now fixed with the new updated exe files I got of BE to test.
Logged

Ronski

  • Moderator
  • Kitizen
  • *
  • Posts: 4308
Re: HG612 modem stats - multiple instances v2 - halts DSLstats
« Reply #11 on: October 23, 2013, 07:02:51 PM »

I can think of 2 possible solutions but dont know how possible they are to implement

1) HG612_stats

When it gets the following message returned, it deletes all running HG612_stat processes
There are 2 instances of HG612_stats.exe running. Status = 0
By the time its reached that point its obviously stuck and will continue to loop

I've suggested the following to BE.

What I think needs to happen when HG612_Stats detects two processes running is the following.

    Obtain the process ID of the current running copy that detected the two copies running. This will need to be done from within your program.
    Obtain the process ID of the other running process - I'll need to alter my TaskListVB to supply this info.
    Wait 30 seconds, and check again if two copies are still running.
    If two copies are running kill the other process.
    Either way exit the current instance.

Although the above will cause data to be missed, it should ensure that both processes are finished prior to the next instance starting.

Does anyone know how to get the process ID in C of the current running instance, also how to kill a process, just to help BE along in case he decides to try this idea?

Or actually as Kitz suggested above, get the current running instance once it detects two copies running to run another program, without waiting for the other program to exit, the other program waits a second to let the instance exit, then kills all HG612_Stats processes.
Logged
Formerly restrained by ECI and ali,  now surfing along at 550/52  ;D

Bald_Eagle1

  • Helpful
  • Kitizen
  • *
  • Posts: 2721
Re: HG612 modem stats - multiple instances v2 - halts DSLstats
« Reply #12 on: October 23, 2013, 07:26:53 PM »

Here's an example via Tasklist.exe from an old ONGOING-ISRUNNING file that was left behind when 2 instances were running:-

HG612_stats.exe               2124                            0      2,888 K
HG612_stats.exe               8688                            0      2,872 K

I presume the instance with the lowest ID would be the first to have run i.e. stuck.

If that is the case, we would know which one to kill, but I'm not sure how to do that using the proccess ID rather than its name (yet).


Logged

burakkucat

  • Respected
  • Senior Kitizen
  • *
  • Posts: 38300
  • Over the Rainbow Bridge
    • The ELRepo Project
Re: HG612 modem stats - multiple instances v2 - halts DSLstats
« Reply #13 on: October 23, 2013, 07:38:18 PM »

Code: [Select]
KILL(2)                    Linux Programmer’s Manual                   KILL(2)



NAME
       kill - send signal to a process

SYNOPSIS
       #include <sys/types.h>
       #include <signal.h>

       int kill(pid_t pid, int sig);

   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

       kill(): _POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _POSIX_SOURCE

DESCRIPTION
       The kill() system call can be used to send any signal to any process group or process.

       If pid is positive, then signal sig is sent to the process with the ID specified by pid.

       If pid equals 0, then sig is sent to every process in the process group of the calling process.

       If pid equals -1, then sig is sent to every process for which the calling process has permission to send signals, except for process 1
       (init), but see below.

       If pid is less than -1, then sig is sent to every process in the process group whose ID is -pid.

       If sig is 0, then no signal is sent, but error checking is still performed; this can be used to check for the existence of  a  process
       ID or process group ID.

       For  a  process  to  have permission to send a signal it must either be privileged (under Linux: have the CAP_KILL capability), or the
       real or effective user ID of the sending process must equal the real or saved set-user-ID of the target process.  In the case of  SIG-
       CONT it suffices when the sending and receiving processes belong to the same session.

RETURN VALUE
       On success (at least one signal was sent), zero is returned.  On error, -1 is returned, and errno is set appropriately.

ERRORS
       EINVAL An invalid signal was specified.

       EPERM  The process does not have permission to send the signal to any of the target processes.

       ESRCH  The  pid  or  process group does not exist.  Note that an existing process might be a zombie, a process which already committed
              termination, but has not yet been wait(2)ed for.

CONFORMING TO
       SVr4, 4.3BSD, POSIX.1-2001.

NOTES
       The only signals that can be sent to process ID 1, the init process, are those for which init has  explicitly  installed  signal  han-
       dlers.  This is done to assure the system is not brought down accidentally.

       POSIX.1-2001  requires  that  kill(-1,sig) send sig to all processes that the calling process may send signals to, except possibly for
       some implementation-defined system processes.  Linux allows a process to signal itself, but on Linux the call  kill(-1,sig)  does  not
       signal the calling process.

       POSIX.1-2001  requires  that  if  a  process sends a signal to itself, and the sending thread does not have the signal blocked, and no
       other thread has it unblocked or is waiting for it in sigwait(3), at least one unblocked signal  must  be  delivered  to  the  sending
       thread before the kill().

   Linux Notes
       Across  different kernel versions, Linux has enforced different rules for the permissions required for an unprivileged process to send
       a signal to another process.  In kernels 1.0 to 1.2.2, a signal could be sent if the effective user ID of the sender matched  that  of
       the  receiver, or the real user ID of the sender matched that of the receiver.  From kernel 1.2.3 until 1.3.77, a signal could be sent
       if the effective user ID of the sender matched either the real or effective user ID of the receiver.  The current rules, which conform
       to POSIX.1-2001, were adopted in kernel 1.3.78.

BUGS
       In  2.6 kernels up to and including 2.6.7, there was a bug that meant that when sending signals to a process group, kill() failed with
       the error EPERM if the caller did have permission to send the signal to any (rather than all) of the members  of  the  process  group.
       Notwithstanding  this error return, the signal was still delivered to all of the processes for which the caller had permission to sig-
       nal.

SEE ALSO
       _exit(2), killpg(2), signal(2), sigqueue(2), tkill(2), exit(3), capabilities(7), credentials(7), signal(7)

COLOPHON
       This page is part of release 3.22 of the Linux man-pages project.  A description of the project, and information about reporting bugs,
       can be found at http://www.kernel.org/doc/man-pages/.



Linux                             2008-08-29                           KILL(2)
Logged
:cat:  100% Linux and, previously, Unix. Co-founder of the ELRepo Project.

Please consider making a donation to support the running of this site.

burakkucat

  • Respected
  • Senior Kitizen
  • *
  • Posts: 38300
  • Over the Rainbow Bridge
    • The ELRepo Project
Re: HG612 modem stats - multiple instances v2 - halts DSLstats
« Reply #14 on: October 23, 2013, 07:46:37 PM »

Code: [Select]
SIGNAL(7)                  Linux Programmer’s Manual                 SIGNAL(7)



NAME
       signal - overview of signals

DESCRIPTION
       Linux supports both POSIX reliable signals (hereinafter "standard signals") and POSIX real-time signals.

   Signal Dispositions
       Each signal has a current disposition, which determines how the process behaves when it is delivered the signal.

       The entries in the "Action" column of the tables below specify the default disposition for each signal, as follows:

       Term   Default action is to terminate the process.

       Ign    Default action is to ignore the signal.

       Core   Default action is to terminate the process and dump core (see core(5)).

       Stop   Default action is to stop the process.

       Cont   Default action is to continue the process if it is currently stopped.

       A process can change the disposition of a signal using sigaction(2) or (less portably) signal(2).  Using these system calls, a process
       can elect one of the following behaviors to occur on delivery of the signal: perform the default action; ignore the signal;  or  catch
       the  signal  with  a  signal  handler,  a programmer-defined function that is automatically invoked when the signal is delivered.  (By
       default, the signal handler is invoked on the normal process stack.  It is possible to arrange that the signal handler uses an  alter-
       nate stack; see sigaltstack(2) for a discussion of how to do this and when it might be useful.)

       The  signal disposition is a per-process attribute: in a multithreaded application, the disposition of a particular signal is the same
       for all threads.

       A child created via fork(2) inherits a copy of its parent’s signal dispositions.  During an execve(2),  the  dispositions  of  handled
       signals are reset to the default; the dispositions of ignored signals are left unchanged.

   Sending a Signal
       The following system calls and library functions allow the caller to send a signal:

       raise(3)        Sends a signal to the calling thread.

       kill(2)         Sends a signal to a specified process, to all members of a specified process group, or to all processes on the system.

       killpg(2)       Sends a signal to all of the members of a specified process group.

       pthread_kill(3) Sends a signal to a specified POSIX thread in the same process as the caller.

       tgkill(2)       Sends a signal to a specified thread within  a  specific  process.   (This  is  the  system  call  used  to  implement
                       pthread_kill(3).)

       sigqueue(2)     Sends a real-time signal with accompanying data to a specified process.

   Waiting for a Signal to be Caught
       The  following system calls suspend execution of the calling process or thread until a signal is caught (or an unhandled signal termi-
       nates the process):

       pause(2)        Suspends execution until any signal is caught.

       sigsuspend(2)   Temporarily changes the signal mask (see below) and suspends execution until one of the unmasked signals is caught.

   Synchronously Accepting a Signal
       Rather than asynchronously catching a signal via a signal handler, it is possible to synchronously accept  the  signal,  that  is,  to
       block  execution  until  the signal is delivered, at which point the kernel returns information about the signal to the caller.  There
       are two general ways to do this:

       * sigwaitinfo(2), sigtimedwait(2), and sigwait(3) suspend execution until one of the signals in a specified set is delivered.  Each of
         these calls returns information about the delivered signal.

       * signalfd(2)  returns  a  file  descriptor that can be used to read information about signals that are delivered to the caller.  Each
         read(2) from this file descriptor blocks until one of the signals in the set specified in the signalfd(2) call is delivered  to  the
         caller.  The buffer returned by read(2) contains a structure describing the signal.

   Signal Mask and Pending Signals
       A signal may be blocked, which means that it will not be delivered until it is later unblocked.  Between the time when it is generated
       and when it is delivered a signal is said to be pending.

       Each thread in a process has an independent signal mask, which indicates the set of signals that the thread is currently blocking.   A
       thread  can  manipulate its signal mask using pthread_sigmask(3).  In a traditional single-threaded application, sigprocmask(2) can be
       used to manipulate the signal mask.

       A child created via fork(2) inherits a copy of its parent’s signal mask; the signal mask is preserved across execve(2).

       A signal may be generated (and thus pending) for a process as a whole (e.g., when sent using kill(2)) or for a specific thread  (e.g.,
       certain  signals,  such  as  SIGSEGV  and  SIGFPE, generated as a consequence of executing a specific machine-language instruction are
       thread directed, as are signals targeted at a specific thread using pthread_kill(3)).  A process-directed signal may be  delivered  to
       any  one  of  the  threads that does not currently have the signal blocked.  If more than one of the threads has the signal unblocked,
       then the kernel chooses an arbitrary thread to which to deliver the signal.

       A thread can obtain the set of signals that it currently has pending using sigpending(2).  This set will consist of the union  of  the
       set of pending process-directed signals and the set of signals pending for the calling thread.

       A child created via fork(2) initially has an empty pending signal set; the pending signal set is preserved across an execve(2).

   Standard Signals
       Linux supports the standard signals listed below.  Several signal numbers are architecture-dependent, as indicated in the "Value" col-
       umn.  (Where three values are given, the first one is usually valid for alpha and sparc, the middle one for ix86, ia64, ppc, s390, arm
       and sh, and the last one for mips.  A - denotes that a signal is absent on the corresponding architecture.)

       First the signals described in the original POSIX.1-1990 standard.

       Signal     Value     Action   Comment
       ----------------------------------------------------------------------
       SIGHUP        1       Term    Hangup detected on controlling terminal
                                     or death of controlling process
       SIGINT        2       Term    Interrupt from keyboard
       SIGQUIT       3       Core    Quit from keyboard
       SIGILL        4       Core    Illegal Instruction
       SIGABRT       6       Core    Abort signal from abort(3)
       SIGFPE        8       Core    Floating point exception
       SIGKILL       9       Term    Kill signal
       SIGSEGV      11       Core    Invalid memory reference
       SIGPIPE      13       Term    Broken pipe: write to pipe with no
                                     readers
       SIGALRM      14       Term    Timer signal from alarm(2)
       SIGTERM      15       Term    Termination signal
       SIGUSR1   30,10,16    Term    User-defined signal 1
       SIGUSR2   31,12,17    Term    User-defined signal 2
       SIGCHLD   20,17,18    Ign     Child stopped or terminated
       SIGCONT   19,18,25    Cont    Continue if stopped
       SIGSTOP   17,19,23    Stop    Stop process
       SIGTSTP   18,20,24    Stop    Stop typed at tty
       SIGTTIN   21,21,26    Stop    tty input for background process
       SIGTTOU   22,22,27    Stop    tty output for background process

       The signals SIGKILL and SIGSTOP cannot be caught, blocked, or ignored.

<snip>

CONFORMING TO
       POSIX.1, except as noted.

BUGS
       SIGIO and SIGLOST have the same value.  The latter is commented out in the kernel source, but the build process of some software still
       thinks that signal 29 is SIGLOST.

SEE ALSO
       kill(1), getrlimit(2), kill(2), killpg(2), setitimer(2), setrlimit(2),  sgetmask(2),  sigaction(2),  sigaltstack(2),  signal(2),  sig-
       nalfd(2),  sigpending(2),  sigprocmask(2),  sigqueue(2), sigsuspend(2), sigwaitinfo(2), abort(3), bsd_signal(3), longjmp(3), raise(3),
       sigset(3), sigsetops(3), sigvec(3), sigwait(3), strsignal(3), sysv_signal(3), core(5), proc(5), pthreads(7)

COLOPHON
       This page is part of release 3.22 of the Linux man-pages project.  A description of the project, and information about reporting bugs,
       can be found at http://www.kernel.org/doc/man-pages/.



Linux                             2008-10-15                         SIGNAL(7)
Logged
:cat:  100% Linux and, previously, Unix. Co-founder of the ELRepo Project.

Please consider making a donation to support the running of this site.
Pages: [1] 2 3
 

anything