LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-23-2011, 12:07 PM   #1
drb
LQ Newbie
 
Registered: May 2011
Posts: 14

Rep: Reputation: Disabled
Question Need Network status and restart help on SuSE system with KDE tools


Hi all,

I have very limited experience with Linux. I have a device running an application that needs to programatically query the networking status and if an issue is found, restart it. I can't seem to run /etc/init.d/networking even using sudo. I can see the init process is running if I issue the "top" command, but I don't see "Networking" in the list.

In general, I know how to build the application and make minor changes and reinstall into the device. Outside of that, Linux is pretty much a black box to me ;-)

Thanks for any guidance you can give me.

drb

Last edited by drb; 05-23-2011 at 12:08 PM. Reason: typo
 
Old 05-23-2011, 12:25 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by drb View Post
Hi all,
I have very limited experience with Linux. I have a device running an application that needs to programatically query the networking status and if an issue is found, restart it. I can't seem to run /etc/init.d/networking even using sudo. I can see the init process is running if I issue the "top" command, but I don't see "Networking" in the list.

In general, I know how to build the application and make minor changes and reinstall into the device. Outside of that, Linux is pretty much a black box to me ;-)

Thanks for any guidance you can give me.
drb
Try an "ls /etc/init.d/net*". I think you'll see that it's "/etc/init.d/network", not "networking", so give that a shot. Your subject line indicates that you're using SuSE, but you don't say what version, so it's hard to be more specific.
 
Old 05-23-2011, 12:38 PM   #3
drb
LQ Newbie
 
Registered: May 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
Lightbulb

Hey TBOne,

Thanks for response. I think you nailed it. As for version, when I issue uname command, it indicates 2.4.0 but not sure if that is version you are after.

So, if I want to issue the restart programically, I'm thinking:

system("/etc/init.d/network restart");

is there more to it?

Thanks in advance,

drb
 
Old 05-23-2011, 01:03 PM   #4
SL00b
Member
 
Registered: Feb 2011
Location: LA, US
Distribution: SLES
Posts: 375

Rep: Reputation: 112Reputation: 112
I think you need to clarify, because "networking" and Network Manager (/etc/init.d/network) are two completely different things. You don't necessarily need the second to have the first.
 
Old 05-23-2011, 01:34 PM   #5
drb
LQ Newbie
 
Registered: May 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
Question

Again, my lack of experience with Linux is showing ;-) So, by way of background, the situation is one where the device is losing its network connectivity at some time (probably due to some network scanning tool) and since we have not been able to figure out a root cause, our approach is to simply watch from within the device (is there a prefered way to do this?) to see if we think our network has lost connection with the outside world. If so, then we restart the network using the "/etc/init.d/network restart" command. Perhaps I'm way off base on either or both of these parts of the approach. I'm all ears if there is a better way to do it.

Thanks

drb
 
Old 05-23-2011, 01:43 PM   #6
SL00b
Member
 
Registered: Feb 2011
Location: LA, US
Distribution: SLES
Posts: 375

Rep: Reputation: 112Reputation: 112
In this case, Network Manager may be the cause, not the solution. I've seen a lot of issues reported with it. I never use it, and I never have network problems. It might be worth your while to try turning that off, and see what happens.

To disable it, launch Yast, go to Network Devices -> Network Settings -> Global Options, and change the checkbox to "Traditional Method with ifup."
 
Old 05-23-2011, 03:06 PM   #7
drb
LQ Newbie
 
Registered: May 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
I'd like to try disabling the Network Manager as you suggest. However, since the final product is a stand alone unit and does not have an external interface I can use, I'd need to do it by adjusting ini files or the equilavent during startup (has to be automatic, no user interaction possible). If you have insight as to how to do this, please let me know.

Just FYI, I do need to use things like DHCP, HTTP, FTP, and PING still, so if those would be lost, then I'll need to figure out how to do this and have them still available.

Thanks for your continued interest in my issue.

drb

Last edited by drb; 05-23-2011 at 03:18 PM. Reason: added content/context
 
Old 05-23-2011, 03:55 PM   #8
SL00b
Member
 
Registered: Feb 2011
Location: LA, US
Distribution: SLES
Posts: 375

Rep: Reputation: 112Reputation: 112
Quote:
Originally Posted by drb View Post
I'd like to try disabling the Network Manager as you suggest. However, since the final product is a stand alone unit and does not have an external interface I can use, I'd need to do it by adjusting ini files or the equilavent during startup (has to be automatic, no user interaction possible). If you have insight as to how to do this, please let me know.
I don't understand what you mean by this. Please elaborate.

Quote:
Originally Posted by drb View Post
Just FYI, I do need to use things like DHCP, HTTP, FTP, and PING still, so if those would be lost, then I'll need to figure out how to do this and have them still available.
These functions are all independent of Network Manager.
 
Old 05-23-2011, 05:03 PM   #9
drb
LQ Newbie
 
Registered: May 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
Elaboration: OK, so I've actually got two Linux systems. The build system, which is actually the one I originally described and that I can try things on via command line, and the target device which is standalone and has no user interface (save a few buttons which are monitored by apps). The target system is still Linux, but I don't even know how to know what version it is. I suppose I could Telnet into it and see what it is and probably should. Anyway, the target system is the one that eventually stops working and needs to be preferably automatically noticed and only affected systems restarted (hopefully only Network systems?). We can tell when it fails because it stops responding to pings but all else still works. We are fairly confident that some security network scan is causing the issue (for unknown reason). This effects so few units a very specific sites that we are inclined to the workaround I've described rather than a full blown investigation ;-)

Like I said, I don't know much about Linux in either case. I know just enough to build the target code image and upload it to the target system. After that, I can make minor changes to the existing apps (one of which is in a loop I can use to monitor Network issues and cause Network restart).

I had this plopped in my lap and really have no background to assist further.

Thanks,

drb

Last edited by drb; 05-23-2011 at 05:33 PM. Reason: omitted word
 
Old 05-24-2011, 08:41 AM   #10
SL00b
Member
 
Registered: Feb 2011
Location: LA, US
Distribution: SLES
Posts: 375

Rep: Reputation: 112Reputation: 112
Okay, I guess I know what you mean about the interface now.

I'd say that if you're going to fix anything on the target box, you're going to have to start getting familiar with the command line. The good news is, the Yast tool I mentioned earlier has an ncurses interface, so it'll give you a graphic-like interface within a normal command shell. The directions I gave for disabling Network Manager work the same whether you're doing it from a command line or a desktop environment.

You're going to need root access to the box to do it, or else get someone else who has root to do it for you.
 
Old 05-24-2011, 01:06 PM   #11
drb
LQ Newbie
 
Registered: May 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
OK, sounds like I have a homework assignment ;-) I'll look into it further and report if I figure it out.

Thanks for all your help,

drb
 
  


Reply



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
VMware snapshot with VMware tools loses network on restart (Host XP, Guest Fedora) John Fletcher Linux - General 12 10-18-2010 12:28 PM
LXer: 5 System Administration Tools for KDE LXer Syndicated Linux News 0 11-02-2009 05:30 PM
How do I set the regulatory daemon to restart when I restart the network service? zahadumy Linux - Networking 0 11-05-2006 11:24 AM
Network tools SUSE 9.1 GraemeK Linux - Distributions 0 09-27-2004 04:42 AM
Connecting to a Novell Network with RedHat 8+KDE tools kierl Linux - Networking 1 04-10-2003 01:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:05 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