1820255 Members
2987 Online
109622 Solutions
New Discussion юеВ

restart network services

 
Vishu
Trusted Contributor

restart network services

hi,
plz tell how can i restart all network services in one command in HP-UX.

Thnx
4 REPLIES 4
Patrick Wallek
Honored Contributor

Re: restart network services

The only single commands, there are actually 2, that will restart ALL network services are:

shutdown
reboot

And restart the entire system.

Otherwise, there is no single command to do EVERYTHING.

You can restart the inetd daemon with /sbin/init.d/inetd. NFS services have 3 different scripts in /sbin/init.d. You also have sendmail, syslog, and ssh that have their own scripts there as well.

spex
Honored Contributor

Re: restart network services

Hello,

You could transition from your current run-level (most likely 3), to 1, and back again via the 'init' command. Of course, doing so may lead to unwanted side-effects.

As Patrick suggests, the safest method is to reboot.

Alternatively, here's a list of init scripts containing "net":

# grep -l net /sbin/init.d/*
/sbin/init.d/SnmpHpunix
/sbin/init.d/hpbtlan
/sbin/init.d/hpether
/sbin/init.d/hpgelan
/sbin/init.d/hpiether
/sbin/init.d/hpigelan
/sbin/init.d/hpsmh
/sbin/init.d/inetd
/sbin/init.d/inetsvcs
/sbin/init.d/net
/sbin/init.d/net.init
/sbin/init.d/nettl
/sbin/init.d/nfs.client
/sbin/init.d/nfs.core
/sbin/init.d/nfs.server
/sbin/init.d/nis.client
/sbin/init.d/nis.server
/sbin/init.d/nisplus.client
/sbin/init.d/nisplus.server
/sbin/init.d/rarpd
/sbin/init.d/rdpd
/sbin/init.d/swagentd
/sbin/init.d/swconfig
/sbin/init.d/vxnm-vxnetd
/sbin/init.d/vxvm-iscsi

PCS
Aussan
Respected Contributor

Re: restart network services

If you made changes to inetd.conf and you want to restart to re-read the file then just do

inetd -c

but if you want to stop the network and restart it again

then login to console and do

/sbin/init.d/net stop
/sbin/init.d/net start
The tongue weighs practically nothing, but so few people can hold it
Srinivas Thokala_1
Frequent Advisor

Re: restart network services

Make sure you logged in from local/remote console, then issue the below commands.
#/sbin/init.d/net stop (to stop services)
#netstat -rn (to verify)
#/sbin/init.d/net start (to start services)

-Srini
Srinivas Thokala