LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-04-2008, 11:03 AM   #1
G4tsu
LQ Newbie
 
Registered: Jul 2008
Posts: 19

Rep: Reputation: 0
signal sent on network turning on/off


Hi,
Anyone knows if there is any signal that kernel sends when network goes up/down?
Thx
 
Old 11-04-2008, 11:40 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,604

Rep: Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960
Quote:
Originally Posted by G4tsu View Post
Hi,
Anyone knows if there is any signal that kernel sends when network goes up/down?
Thx
Yes...this is where the messages in your syslog come from, when a link goes up or down.

http://linux.die.net/man/8/ifplugstatus

....should explain more. Note that this is for the connection only; if someone unplugs a cable, you'll get something. If the switch you're plugged in to is up, but someone removes it's upstream connection, you won't get anything...the link is still active, but just doesn't go anywhere.

Your question said when the network goes up/down....lots of parts to a network....
 
Old 11-05-2008, 03:06 AM   #3
G4tsu
LQ Newbie
 
Registered: Jul 2008
Posts: 19

Original Poster
Rep: Reputation: 0
Uhm I am not sure that tool can help me... It seems a command line tool...

Instead what I would need is a signal (such as SIGCHLD, SIGUSR1, SIGSEV, ecc) sent to a daemon of mine when cable is plugged...
 
Old 11-05-2008, 08:13 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,604

Rep: Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960
Quote:
Originally Posted by G4tsu View Post
Uhm I am not sure that tool can help me... It seems a command line tool...

Instead what I would need is a signal (such as SIGCHLD, SIGUSR1, SIGSEV, ecc) sent to a daemon of mine when cable is plugged...
Ok....so get the source for that, and use the parts you need for your program. Or have your program monitor the system logs for a LINK-UP/DOWN event....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Turning several rs232 connections into a network using terminal servers? klauswunderlich Linux - Networking 2 01-16-2008 11:07 PM
security newbie...turning off a specific network port jys88 Linux - Security 2 12-14-2005 04:22 PM
network card needs to be restarted after turning router off and on JacekZ Linux - Networking 2 09-06-2005 05:03 PM
Turning Mandriva live-CD into network boot make Mandriva 0 08-05-2005 01:02 AM
Turning a XP/XP network configuartion into a Redhat/XP Network Download-This Linux - Networking 3 10-11-2002 02:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration