LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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
 
LinkBack Search this Thread
Old 11-21-2007, 03:00 PM   #1
senthilvael
Member
 
Registered: Nov 2007
Posts: 73

Rep: Reputation: 17
Unhappy Is It Possible to write a script which login a remote server


Can we write a script which
1. Logging to a Remote server.
2. Give Password.
3. Checking disk space
4. Taking log
5. If disk space is too less, give an alert
6. Doing this for several servers creating a log file.

I think this is very difficult. But is it possible?. If yes, What i have to study. I am very new to scripting but i love it. Please help me...
 
Old 11-21-2007, 03:23 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,344

Rep: Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945
there are better ways to do what you want really. for a mass solution i'd suggest snmp, but certainly you can do this with a script...

Set up ssh preshared key and then a command as simple as
Code:
ssh user@server df -h
will get you the disk stats on the remote machine to do what you want with.
 
Old 11-21-2007, 05:11 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,950
Blog Entries: 11

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
Quote:
Originally Posted by senthilvael View Post
Can we write a script which
1. Logging to a Remote server.
2. Give Password.
3. Checking disk space
4. Taking log
5. If disk space is too less, give an alert
6. Doing this for several servers creating a log file.

I think this is very difficult. But is it possible?. If yes, What i have to study. I am very new to scripting but i love it. Please help me...

Looking at this in conjunction with the older telnet thread I have to
wonder why you don't look into something like nagios



Cheers,
Tink
 
Old 11-21-2007, 05:56 PM   #4
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5
Posts: 16,086

Rep: Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995
or OpenNMS
 
Old 11-21-2007, 06:23 PM   #5
senthilvael
Member
 
Registered: Nov 2007
Posts: 73

Original Poster
Rep: Reputation: 17
Ok i am searching both. I am using Cent Os 4.5.I am very new to this field. So that so many things i have to learn.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
auto-login script for connecting to remote m/n by using telnet/ftp/ssh Uday123 Programming 5 10-12-2011 11:31 AM
shell script for remote ssh login sefaklc Programming 5 08-28-2007 09:03 PM
How to login a remote server from my computer? backpacker Linux - Newbie 2 01-08-2006 09:20 PM
remote login to windows server Darkfalz Linux - Networking 1 09-22-2005 08:10 AM
Remote login to an intranet server behind firewall? J_Szucs Linux - Newbie 3 07-20-2002 11:49 AM


All times are GMT -5. The time now is 10:19 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration