Perl shutdown of servers


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Perl shutdown of servers
# 1  
Old 02-14-2008
Question Perl shutdown of servers - very confused

Hello everyone,

I need a small program to gracefully shut down a server.
The shutdown program should take both an address and a port and that way it can shut down components on remote machines.

I've been digging through many websites and getting more and more puzzledSmilie.

Any help will be very appreciated.

THANK YOU

Minifish

Last edited by minifish; 02-14-2008 at 11:41 AM..
# 2  
Old 02-14-2008
Error

I have the same problem. Can anyone help????????????
# 3  
Old 02-14-2008
Quote:
Originally Posted by minifish
I need a small program to gracefully shut down a server. The shutdown program should take both an address and a port and that way it can shut down components on remote machines. I've been digging through many websites and getting more and more puzzledSmilie. Any help will be very appreciated. THANK YOU Minifish
Code:
ssh root@host /sbin/shutdown

# 4  
Old 02-14-2008
Quote:
Originally Posted by HPAVC
Code:
ssh root@host /sbin/shutdown

Thanks, I think minifish mentioned shutting down server use perl.
do you know how we can do that? =)
# 5  
Old 02-14-2008
Quote:
Originally Posted by katrvu
Thanks, I think minifish mentioned shutting down server use perl. do you know how we can do that? =)
Same thing, if you think your going to write a script that is going to walk the init sequence you might just as well:

Code:
#!/usr/bin/perl
kill 9, 1;

Though that is not graceful by any means. You really should use the /etc/init.d/FILE, rndc, apachectl files rather than programming some sort of direct PID manipulation program (which will be ungraceful).

Use perl to ssh to the remote machine and issue the commands.
# 6  
Old 02-14-2008
# 7  
Old 02-14-2008
what does it take to shut down a server?
what does shut down actually mean?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help required for Oracle database shutdown script conversion from shell to perl

Please tell me how to convert below program from shell script to perl. Same commands need to use in shutdown, just need program help for startup. export ORACLE_BASE=/home/oracle1 lsnrctl start lndb1 sqlplus '/ as sysdba' startup; (2 Replies)
Discussion started by: learnbash
2 Replies

2. AIX

Shutdown command

Hi, is there a difference between shutdown -Fand shutdown -h now? (3 Replies)
Discussion started by: x_adm
3 Replies

3. UNIX for Dummies Questions & Answers

Script to force Oracle database shutdown when shutdown immediate does not work

I have Oracle 9i R2 on AIX 5.2. My Database is running in shared server mode (MTS). Sometimes when I shutdown the database it shutsdown cleanly in 4-5 mints and sometimes it takes good 15-20 minutes and then I get some ora-600 errors and only way to shutdown is by opening another session and... (7 Replies)
Discussion started by: aixhp
7 Replies

4. AIX

Plan to shutdown servers

Hello everyone I need to shutdown all my servers and my storage. I would like to hear your opinions about this. This is my little plan about all this. 1.-Stop the applications 2.-Stop the webservers 3.-Stop the ihs 4.-Stop the databases 5.-Verify no process are running 6.-Close the... (1 Reply)
Discussion started by: lo-lp-kl
1 Replies

5. Shell Programming and Scripting

Shell/perl script to connect to different servers in single login in teradata

Hi, I want to write a shell script to compare two tables in teradata.these tables are present on different servers. I want to connect to both servers in single login in order to fetch and compare the data in one go. Thanks (1 Reply)
Discussion started by: monika
1 Replies

6. Solaris

shutdown question

Hi is shutdown and init 0 are same command in solaris? (2 Replies)
Discussion started by: mokkan
2 Replies

7. UNIX for Dummies Questions & Answers

A script for shutdown

I want to make a script to shutdown a unixware computer from other user then root. In Sco version i use "as root" but in the unixware i don't know. Please help me. 10x (12 Replies)
Discussion started by: kelu
12 Replies

8. UNIX for Advanced & Expert Users

Shutdown

Firstly uname -a = UnixWare companyname 5 7.1.4 i386 x86at SCO UNIX_SVR5 Server is an HP Proliant ML350 G4 Tower Right, now to the problem. We frequently have power outtages and lightning strikes here due to our location in a VERY rural part of the UK. As such, I need to be able to remotely... (6 Replies)
Discussion started by: aewpcoles
6 Replies

9. Linux

non root shutdown????

Hey, I was wondering if there was an easy way to give a nonroot user shutdown privileges? I've been reading lots about it but it's all long and complicated for what i need to do. Really i just need this user to beable to run one command shutdown -h now and thats it. Oh yeah and i'm running... (4 Replies)
Discussion started by: byblyk
4 Replies

10. UNIX for Advanced & Expert Users

to shutdown

Hai Could somebody tell me the solution to my problem. the question is as follows there is one unix server and 100 dummy terminals connected to my server, i want to shutdown client system if some of the client forgetten to power down their system. plez provide me the code for that. (2 Replies)
Discussion started by: rajashekaran
2 Replies
Login or Register to Ask a Question