Hi,
Try to use the absolute path of your zmcontrol, it might work. I also
experienced the same problem with perl and cron. I just edited my program
and use absolute path for all binaries I call on the program and it works
with me.
On 5/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:
Send PLUG mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.hosting.qsr.com.ph/mailman/listinfo/plug
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of PLUG digest..."
Today's Topics:
1. Re: RAID 5 (Federico Sevilla III)
2. Re: Cron and perl issue (Amir Joven)
3. RE: Cron and perl issue (Noli Rafallo)
4. Re: RAID 5 (jumbz tayamen)
5. Re: FOSS based Bundy Clock? (Pietro Calingasan III)
6. Re: FOSS based Bundy Clock? (Jun Martin)
----------------------------------------------------------------------
Message: 1
Date: Wed, 16 May 2007 19:48:27 +0800
From: Federico Sevilla III <[EMAIL PROTECTED]>
Subject: Re: [plug] RAID 5
To: [email protected]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii
On Wed, May 16, 2007 at 01:55:53AM -0700, Linuxpol wrote:
> Im kind a new in RAID. i have IBM xSeries 206m with 4 SATA HDD. im
> planning to have RAID 5. i will be using its hardware base raid. my
> question is do i have to reinstall my system upon setting up raid 5?
> or is it transparent?
Setting up RAID or changing RAID levels will wipe out your hard drives.
So you have to back up your system and data, configure RAID, then
restore your system and data.
After you've set up hardware RAID, it's transparent to the OS.
--
Federico Sevilla III
F S 3 Consulting Inc.
http://www.fs3.ph
------------------------------
Message: 2
Date: Wed, 16 May 2007 19:53:53 +0800
From: "Amir Joven" <[EMAIL PROTECTED]>
Subject: Re: [plug] Cron and perl issue
To: "Philippine Linux Users' Group (PLUG) Technical Discussion List"
<[email protected]>
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"
try this: 10,20,30,40,50 * * * * /path/to/perlscript >
/path/to/somelog.log
and check the content of 'somelog.log', this will give you an idea whether
the script was executed properly.
you can also replace 10,20,30,40,50 with */10 if you want it to execute
every 10 mins.
quick guess: maybe 'zmcontrol' is not on your execution path or maybe perl
cannot resolve where it is.
On 5/16/07, Noli Rafallo <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I am monitoring multiple processes and if one fails, a Perl script
> restarts
> it. I've tested the Perl script and it works just fine when run via
> terminal. The problem arises when the script is called via cron. Cron
logs
> shows that it successfully executed the script but it seems that the
> script
> failed to detect if a process is not running. Here is the script
(warning
> perl newbie)
>
> ---- Perl begins
>
> #!/usr/local/bin/perl
>
> # use strict;
>
> my $status = `zmcontrol status|grep "Stopped"`;
>
> open(MYOUTFILE, ">>zprocmon.log");
> print MYOUTFILE scalar(localtime), " - Running monitor and restart if
> necessary.\n";
>
> if ($status) {
> print $status;
> print MYOUTFILE scalar(localtime), " - found stopped process,
> restarting.\n";
> @args = ("zmcontrol","stop");
> system(@args) == 0
> or print MYOUTFILE scalar(localtime), " - error running the
> program.\n";
>
> @args = ("zmcontrol", "start");
> system(@args) == 0
> or print MYOUTFILE scalar(localtime), " - error running the
> program.\n";
> } else {
> print MYOUTFILE scalar(localtime), " - process are all running, no
> need
> to restart.\n";
> }
>
> ---- Perl ends
>
> ---- Cron entry
>
> # first try
> 10,20,30,40,50 * * * * /path/to/perlscript > /dev/null 2>&1
>
> # second try
> 10,20,30,40,50 * * * * /path/to/perlscript
>
> ---- End Cron
>
> Is there something wrong?
>
> Thanks
>
> _________________________________________________
> Philippine Linux Users' Group (PLUG) Mailing List
> [email protected] (#PLUG @ irc.free.net.ph)
> Read the Guidelines: http://linux.org.ph/lists
> Searchable Archives: http://archives.free.net.ph
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
https://lists.hosting.qsr.com.ph/mailman/private/plug/attachments/20070516/8cb93b20/attachment.html
------------------------------
Message: 3
Date: Wed, 16 May 2007 20:00:37 +0800
From: "Noli Rafallo" <[EMAIL PROTECTED]>
Subject: RE: [plug] Cron and perl issue
To: "'Philippine Linux Users' Group (PLUG) Technical Discussion List'"
<[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii"
Zmcontrol is in the execution path when logged in as user zimbra. Cron
entry
is under user zimbra. I believe that Perl can resolve where zmcontrol is
because running ./perlscript successfully detects if a process has stopped
and can successfully start and stop it too. I'll try your suggestion
though
to see what happens when cron runs the script.
Thanks
_____
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Amir Joven
Sent: Wednesday, May 16, 2007 7:54 PM
To: Philippine Linux Users' Group (PLUG) Technical Discussion List
Subject: Re: [plug] Cron and perl issue
try this: 10,20,30,40,50 * * * * /path/to/perlscript >
/path/to/somelog.log
and check the content of 'somelog.log', this will give you an idea whether
the script was executed properly.
you can also replace 10,20,30,40,50 with */10 if you want it to execute
every 10 mins.
quick guess: maybe 'zmcontrol' is not on your execution path or maybe perl
cannot resolve where it is.
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
https://lists.hosting.qsr.com.ph/mailman/private/plug/attachments/20070516/319d2b2f/attachment.htm
------------------------------
Message: 4
Date: Sun, 17 Jun 2007 09:36:59 +0800
From: jumbz tayamen <[EMAIL PROTECTED]>
Subject: Re: [plug] RAID 5
To: "Philippine Linux Users' Group (PLUG) Technical Discussion List"
<[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"
you also might encounter problems. the 206m hardware RAID controller is
a "FAKE" raid controller. So you might also want to read up on that.
Federico Sevilla III wrote:
> On Wed, May 16, 2007 at 01:55:53AM -0700, Linuxpol wrote:
>
>> Im kind a new in RAID. i have IBM xSeries 206m with 4 SATA HDD. im
>> planning to have RAID 5. i will be using its hardware base raid. my
>> question is do i have to reinstall my system upon setting up raid 5?
>> or is it transparent?
>>
>
> Setting up RAID or changing RAID levels will wipe out your hard drives.
> So you have to back up your system and data, configure RAID, then
> restore your system and data.
>
> After you've set up hardware RAID, it's transparent to the OS.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
https://lists.hosting.qsr.com.ph/mailman/private/plug/attachments/20070617/560b62ed/attachment.html
------------------------------
Message: 5
Date: Thu, 17 May 2007 10:56:24 +0800
From: "Pietro Calingasan III" <[EMAIL PROTECTED]>
Subject: Re: [plug] FOSS based Bundy Clock?
To: "Philippine Linux Users' Group (PLUG) Technical Discussion List"
<[email protected]>
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Most of the serial and usb bar code 'gun' works well with linux. One
thing you can do is upon upong recognizing the bar code, a picture
will pop-up, along with the employees info. The security officer then
will recognize the irregularities.
------------------------------
Message: 6
Date: Thu, 17 May 2007 10:57:33 +0800
From: Jun Martin <[EMAIL PROTECTED]>
Subject: Re: [plug] FOSS based Bundy Clock?
To: "Philippine Linux Users' Group (PLUG) Technical Discussion List"
<[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1
I don't know if it's the rule, but all the barcode scanners I've seen
just hijack the PS/2 keyboard cable and so they send the codes as if
you've typed them on the keyboard, albeit a lot faster.
This thread has also got me thinking I should just use this approach
instead of biometric (is that the right term) scanners.
Mhac Janapin wrote:
> LOL! Thanks Doc.
> We are not that big company; just about less than 100. I'm thinking of
> just buying a barcode scanner as Ariz suggested. Then I'll just print
> barcodes into stickers and stick them in their IDs.
>
> Now on to research as to supported barcode scanners out there that
> will work with my PC. :-)
------------------------------
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph
End of PLUG Digest, Vol 26, Issue 44
************************************
--
Ronaldo G. Rojas
Linux Registered User #427229
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph