- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Installing patches at re boot
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2002 01:36 AM
10-29-2002 01:36 AM
Installing patches at re boot
NETSTAT_DATA=/var/adm/netstat_data
What I need to add into the line below is
/usr/contrib/bin/nettune -s tcp_fin_wait_timer 675
Does anyone have the best way to do this or any examples of perhaps, sed I could use to perform this.
One this is done, I was thinking of running a quick check on the file, say a grep verifying the line is there. I was then going to install the patch and then let the system re boot as normal in the backup schedule.
Has anyone ever done this as part of the reboot or perhaps added something to cron which has done a similar things.
Any suggestion would be greatly appreciated.
Thanks
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2002 01:58 AM
10-29-2002 01:58 AM
Re: Installing patches at re boot
I believe that this patch gives you the ability to set the fin_wait_timer value.
Rather than amend /sbin/init.d/net, why don't you create your own startup script that runs nettune. You can install this on all the servers so that it runs on next reboot. If the patch isn't installed, the script will just write an error mesage to /etc/rc.log.
An example script...
#!/sbin/sh
#
# Script to configure the network:-
#
PATH=/usr/sbin:/usr/bin:/sbin
export PATH
case $1 in
start)
ERR=""
if [[ -x /usr/contrib/bin/nettune ]];
then /usr/contrib/bin/nettune -s tcp_fin_wait_timer 675
if [[ $? != 0 ]];
then echo "nettune failed!"
ERR=true
fi
else echo "/usr/contrib/bin/nettune not executable!"
ERR=true
fi
if [[ -z ${ERR} ]];
then exit 0
else exit 1
fi ;;
start_msg) echo "network tailoring.";;
*) print "Usage: $0 {start|start_msg}"
exit 1;;
esac
exit 0
Put this script in /sbin/init.d and a soft link to it called S???xxxx in /sbin/rc2.d (??? is a number and xxxx a name that you choose).
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2002 04:47 AM
10-29-2002 04:47 AM
Re: Installing patches at re boot
Hi, thanks for reply. The issue I have is that in order to get downtime on over 200 servers is a little difficult, hence why I wanted to simply add the line to the net startup file and then issue a install on the patch.
For example
swinstall -x autoreboot=true -x match_target=true -s /tmp/PHNE_19936/depot
This would then reboot the server as part of the weekly downtime we have organised and would then save me speaking to 200 offices to arrange downtime !!! Hence my query on the use of sed to perhaps update the net file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2002 04:57 AM
10-29-2002 04:57 AM
Re: Installing patches at re boot
ex net << EOD
/NETSTAT_DATA=
/^$
s;^;/usr/contrib/bin/nettune -s tcp_fin_wait_timer 675
wq!
EOD
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2002 04:57 AM
10-29-2002 04:57 AM
Re: Installing patches at re boot
Paul,
WHy not just push a new /sbin/rc2.d/S800net file before you do your swinstall??
rcp new_S800net remotehost:/sbin/rc2.d/S800net
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2002 05:32 AM
10-29-2002 05:32 AM
Re: Installing patches at re boot
So by running in a script
ex net << EOD
/NETSTAT_DATA=
/^$
s;^;/usr/contrib/bin/nettune -s tcp_fin_wait_timer 675
wq!
EOD
This would basically use ex and then amend my net file.
Should the top line include the full path of the netfile I wish to amend ?
For instance
ex /sbin/rc2.d/S800net << EOD
Also the /NETSTAT_DATA=
When I try running the script as above, or amendments to the full path, the message displayed is.
Pattern not found
Does this refer to the line NETSTAT_DATA=
I was wondering if this should read
NETSTAT_DATA=/var/adm/netstat_data
THis being the full line in the file ?
However if I try this, it reports
var: Not an editor command
Could I substitue anything in this line, such as a ' or a " to allow for the full line to be resolved
Teh next stage seems clear as the line is substitued under the NETSTAT line.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2002 05:45 AM
10-29-2002 05:45 AM
Re: Installing patches at re boot
/NETSTAT_DATA=
works on my copy of 'net'. ex doesn't like the full line because it contains '/' characters
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2002 05:48 AM
10-29-2002 05:48 AM
Re: Installing patches at re boot
Regards,
Trond
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2002 06:17 AM
10-29-2002 06:17 AM
Re: Installing patches at re boot
My script should read ?
ex /sbin/rc2.d/S340net << EOD
/NETSTAT_DATA=
/^$
s;^;/usr/contrib/bin/nettune -s tcp_fin_wait_timer 675
wq!
EOD
If when running this, I receive
NETSTAT_DATA=/var/adm/netstat_data
Pattern not found
Any ideas ?
Also, thankyou for your assistance so far
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2002 06:23 AM
10-29-2002 06:23 AM
Re: Installing patches at re boot
NETSTAT_DATA=/var/adm/netstat_data
and I used this to insert the nettune command.
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2002 08:29 AM
10-29-2002 08:29 AM
Re: Installing patches at re boot
I have now got this working.
Made the script as follows.
ex /home/H089AHE/S340net << EOD
/NETSTAT_DATA=
/^$
s;^;/usr/contrib/bin/nettune -s tcp_fin_wait_timer 675
wq!
EOD
Thankss again.