LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-11-2010, 05:12 AM   #1
dhirendrs
Member
 
Registered: Nov 2009
Posts: 45

Rep: Reputation: 15
i have linux server client env. and thus i want one script


Hi ,

I have server name x on that server i want to run the script which connect to the all client with cron job and check that procee on client is runing or not add details client wise in one txt file date and time stamp.

e.g on server 10.112.97.101

i am taking ssh 10.112.97.102 -- client.

and execute the ps -wef | grep Process name

which do automatically on every 10 min use of the script and cronjob.

onthe serever datatime.txt and contain of the

datetime.txt is

client1 - service is ok
client2 - service is down with time ....
client3 - service is ok

Regards
Dhiren shah
 
Old 08-11-2010, 05:18 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

This is not the approach that will give you a good result. LinuxQuestions users are not in the habit of providing ready to go solutions but are at their best resolving problems.

Keeping that in mind, best thing for you to do is post what you have tried so far, where it's failing, what processes you want to monitor, what distributions you are using (all the same or different), and so on.

The more information you provide the better we can help you.

Kind regards,

Eric
 
Old 08-11-2010, 05:51 AM   #3
dhirendrs
Member
 
Registered: Nov 2009
Posts: 45

Original Poster
Rep: Reputation: 15
script required

Hello i want to check database service

like ps -wef | grep postgres

Regards
Dhiren shah


Quote:
Originally Posted by EricTRA View Post
Hello,




This is not the approach that will give you a good result. LinuxQuestions users are not in the habit of providing ready to go solutions but are at their best resolving problems.

Keeping that in mind, best thing for you to do is post what you have tried so far, where it's failing, what processes you want to monitor, what distributions you are using (all the same or different), and so on.

The more information you provide the better we can help you.

Kind regards,

Eric
 
Old 08-11-2010, 05:55 AM   #4
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

Ok, and how about answering the other questions like what distro / version, same on all remote machines or different, what form of connection (SSH, Telnet, directly to DB server, ...), authentication depending on form of connection, ...
And most important, what have you written/tried/tested yourself and where and how is it failing?

As stated before, YOU will have to put in most of the work, don't expect a ready made solution from LQ users.

Kind regards,

Eric
 
1 members found this post helpful.
Old 08-11-2010, 06:20 AM   #5
dhirendrs
Member
 
Registered: Nov 2009
Posts: 45

Original Poster
Rep: Reputation: 15
ssh

Dear ssh,

and did the password enable ....

it is centos server client env.

Regards
Dhiren shah

Quote:
Originally Posted by EricTRA View Post
Hi,

Ok, and how about answering the other questions like what distro / version, same on all remote machines or different, what form of connection (SSH, Telnet, directly to DB server, ...), authentication depending on form of connection, ...
And most important, what have you written/tried/tested yourself and where and how is it failing?

As stated before, YOU will have to put in most of the work, don't expect a ready made solution from LQ users.

Kind regards,

Eric
 
Old 08-11-2010, 07:30 AM   #6
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

Way to little information and most important: What have you written as script and where is it failing?

Kind regards,

Eric
 
1 members found this post helpful.
Old 08-12-2010, 04:30 AM   #7
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

You marked your thread as solved. Could you please post the solution you got so that others might profit from it too?

Kind regards,

Eric
 
  


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
How to call Shell Script on a remote server with remote servers env variables need Linux - Server 1 10-14-2009 08:37 PM
I want to run script on the server from client machine in windows in a perl script vpradeep Linux - Newbie 2 09-01-2008 03:29 AM
Possible to call a client side command from a script on server, via SSH connection. a2brute Linux - Networking 7 04-07-2008 12:11 PM
can not connect to my pureftp server from Linux client, but i can from windows client bonito SUSE / openSUSE 5 03-16-2005 09:45 PM
how do you set an env variable from within a csh script? BrianK Linux - General 3 05-26-2004 02:16 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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