Re: [PHP] Best Approach

2008-01-30 Thread Jochem Maas

it aint PHP ... but I've just fall in love with this: http://www.capify.org/

which won't help if any of the servers in question are windows boxes unless you
can install cygwin on there (I'm guessing that would allow it to work). although
from reading your post I gather you have to perform the task *from* a windows
boxes on on a windows box and that shouldn't be a problem

Miguel Guirao schreef:

Hello fellow members of this list,

There is a couple of rutinary tasks that our servers (different platforms)
perform during the night. Early during the day, we have to check that every
task was performed correctly and without errors. Actually, we do this by
hand, going first to server A (AIX platform), and verifying that the error
logs files have a size of zero (0), which means that there were no errors to
report on the logs, verify that some files have been written to a specific
directory and so on. As I told you before, this is done by hand, many ls
commands, grep’s and more’s here and there!!

On the other hand, I have to do this on a another Windows 2003 server!!

So, I’m thinking on creating a web page on PHP that performs all this tasks
for me, and my fellow co-workers. But, all my experience with PHP is about
working with data on MySQL server, wrting files to a harddisk, sending
e-mails with or without attachments and so on.

Is PHP a correct approach to solve this tedious problem?? Can I access a
servers and get the results of a ls command for instance??

Best Regards,

__
Miguel Guirao Aguilera, Linux+, ITIL
Sistemas de Información
Informática R8 - TELCEL
Ext. 7540




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Best Approach

2008-01-22 Thread Richard Lynch
On Mon, January 21, 2008 5:55 pm, Miguel Guirao wrote:
> Is PHP a correct approach to solve this tedious problem?? Can I access
> a
> servers and get the results of a ls command for instance??

I would use PHP, personally, since I know it best.

It might be easiest to install PHP on each box, and have it in a cron
job to check whateve and send the results, perhaps via email, to
somewhere.

Another option would be to right a PHP webpage on each box, and have
the central box just file_get_contents() on each page -- assuming you
can turn on allow_url_fopen on that box.

You *could* go whole hog and use PHP to set up RPC or SOAP on each
box, to allow you to execute the commands, but that would be a lot of
extra work for not much benefit for such a simple task.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Best Approach

2008-01-22 Thread Jay Blanchard
[snip]
Is PHP a correct approach to solve this tedious problem?? Can I access a
servers and get the results of a ls command for instance??
[/snip]

You can use some of PHP's functions, such as readdir() (roughly an ls in
PHP land http://www.php.net/readdir ). You can also use exec (to
execute) and other commands like fopen (to read, write, append). PHP
will actually work pretty well.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Best Approach

2008-01-21 Thread Bastien Koert

sure, why notyou can exec most of the commands and log all of the results 
to a file that you can email yourself

bastien


















> Date: Mon, 21 Jan 2008 17:55:11 -0600
> From: [EMAIL PROTECTED]
> To: php-general@lists.php.net
> Subject: [PHP] Best Approach
> 
> Hello fellow members of this list,
> 
> There is a couple of rutinary tasks that our servers (different platforms)
> perform during the night. Early during the day, we have to check that every
> task was performed correctly and without errors. Actually, we do this by
> hand, going first to server A (AIX platform), and verifying that the error
> logs files have a size of zero (0), which means that there were no errors to
> report on the logs, verify that some files have been written to a specific
> directory and so on. As I told you before, this is done by hand, many ls
> commands, grep’s and more’s here and there!!
> 
> On the other hand, I have to do this on a another Windows 2003 server!!
> 
> So, I’m thinking on creating a web page on PHP that performs all this tasks
> for me, and my fellow co-workers. But, all my experience with PHP is about
> working with data on MySQL server, wrting files to a harddisk, sending
> e-mails with or without attachments and so on.
> 
> Is PHP a correct approach to solve this tedious problem?? Can I access a
> servers and get the results of a ls command for instance??
> 
> Best Regards,
> 
> __
> Miguel Guirao Aguilera, Linux+, ITIL
> Sistemas de Información
> Informática R8 - TELCEL
> Ext. 7540
> 

_

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Best Approach

2008-01-21 Thread Chris

Miguel Guirao wrote:

Hello fellow members of this list,

There is a couple of rutinary tasks that our servers (different platforms)
perform during the night. Early during the day, we have to check that every
task was performed correctly and without errors. Actually, we do this by
hand, going first to server A (AIX platform), and verifying that the error
logs files have a size of zero (0), which means that there were no errors to
report on the logs, verify that some files have been written to a specific
directory and so on. As I told you before, this is done by hand, many ls
commands, grep’s and more’s here and there!!

On the other hand, I have to do this on a another Windows 2003 server!!

So, I’m thinking on creating a web page on PHP that performs all this tasks
for me, and my fellow co-workers. But, all my experience with PHP is about
working with data on MySQL server, wrting files to a harddisk, sending
e-mails with or without attachments and so on.

Is PHP a correct approach to solve this tedious problem?? Can I access a
servers and get the results of a ls command for instance??


If you run a series of commands in sequence, you can write a batch 
script or shell script to do the same.


Then get cron or windows to run that script.

cron at least can mail the results of a command and/or script to a 
specified email address, not sure about scheduled tasks in windows.


--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php