Johann,
I have had the same problem. Check, I bet the versions of Berkley
DB are different.
Chad
Johann Spies wrote:
We have a situation that we need to open a dbm-file but cannot do so
using perl version 5.8.4-2 on Debian Sarge. The following script
fails, but the same script and dbm-file
the values and add
them together, but I can't seem to get it right.
But I did not realize this is not an "appropriate" topic for this
mailing list. I apologize for that..
Anyways, thanks for the help.
Chad
On Wed, 2004-02-25 at 14:55, WC -Sx- Jones wrote:
> chad kellerman
Hello everyone...
I am working on a perl one liner for adding quota on multiple
partitions. But I can not, for the life of me get the number to add
up..
Here is what I have:
/usr/bin/quota michele | perl -ne 'if(/none$/){print
"9\n"}elsif(m:^\s+/dev/:){($q,
$l)=(split(/\s+/))[2
Hello everyone,
I have a little issue that I am sure someone has come across here
once before and was wondering if I can get some pointers.
I am trying to read and grab values from a "messy" httpd.conf
file. What I am trying to do is grab the ServerName value and
DocumentRoot value for
Hello everyone,
I am starting to work on a script that is going to process a few
files in some users directories. I thought I would do some checking on
the file to make sure they are there and to make sure they are really
files. I thought it was going to be pretty straight forward, until I
ran
Hello,
I am writing a program that backups up databases. I am having
trouble tarring up the directories. Tarring files using Archive::Tar is
pretty straight forward, but tarring directories, I am having issues:
here is part of the code..
$datadir = "/var/lib/mysql/";
$dbQuery = qq(
Hey guys,
I know you can do one a liner that appends a string after line in a
file:
ie: perl -p -i -e 's/$oldsting/$1\n$nextline/' file.txt
But I was doing it in a script:
#!/usr/bin/perl
use strict;
my $conf = "/home/bob/my.cnf";
my $string = "mysqld]";
my $replace = "bob was here";
open
John,
Thanks that was perfect..
Chad
On Fri, 2003-10-10 at 03:11, John W. Krahn wrote:
> Chad Kellerman wrote:
> >
> > Hello,
>
> Hello,
>
> >I am opening up a file (actually a my.conf). I only want 2 lines in
> > the file. port and datadir
Hello,
I am opening up a file (actually a my.conf). I only want 2 lines in
the file. port and datadir
The problem I am running into is that there is a port = 3324 in both
the [client] section and the [mysqld] section.
I want to open the file and go straight to the [mysqld] section and
f for the line that says:
f( $pid > 0 ) {
Not too sure what to make of it??
Thansk for the help
CHad
On Thursday 27 March 2003 11:59 am, Rob Dixon wrote:
> Hi Chad.
>
> Chad Kellerman wrote:
> > Hello,
> >
> >Got a little issue. Tyring ot under stand how thin
Hello,
Got a little issue. Tyring ot under stand how things work but just not
getting it. I am forking each element of the array . I have a maximum child
count of 8. Which works. What I was wondering is if I get into the if
statement in the until loop. How do I exit the pid clean up a
h
> help for you. What would work for me probably would not for you.
>
> Jenda
> = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =
> When it comes to wine, women and song, wizards are allowed
> to get drunk and croon as much as they like.
> -- Terry Pratchett in Sourcery
, Jenda Krynicky wrote:
> From: chad kellerman <[EMAIL PROTECTED]>
>
> > Helloe everyone,
> >I was wondering is someone can help me out with an issue with
> >forking. I
> > am trying to fork 8 process at a time.
>
> I did not read the previous thread. Di
Helloe everyone,
I was wondering is someone can help me out with an issue with forking. I
am trying to fork 8 process at a time.
Here is what I have:
#!/usr/bin/perl
use strict;
use warnings;
use lib ".";
use BACKUP; #my own module
use POSIX ":sys_wait_h";
my( $MAX_CHILDREN ) = "8";
Hello everyone,
I want to clean this bit of code up. It looks really messy. I am in a
mental block. Any suggestions?
@userInfo = split /\s+/, $buffer;
#insert home users & quota in the db
foreach $userInfo ( @userInfo ) {
( $name, $quota ) = split /\|/, $user
tIt($server,$driveNum,%mslRef);
}else{
my $driveNum = "1";
#MysqlIt($server,$driveNum,%mslRef);
TestIt($server,$driveNum,%mslRef);
}
If /home2 is not returned from the ssh commnd I get the warning
thanks in advance for the help.
chad
--
chad kellerman <[EMAIL PROTECTED]>
signature.asc
Description: This is a digitally signed message part
Mark,
This is a pain to install. I would do it thru CPAN.
perl -MCPAN -e shell
cpan>install Net::SSH::Perl
I fyou don't have root access to install perl modules, try to use
Net::SSH.
use strict;
use warnings;
use Net::SSH qw( sshopen3 );
my $user = "bob";
my $host = "10.10.10.10";
my $
Dammit, got the split wrong.
try this:
my ( $time, $uptime ) = ( split / /, $out[0] )[0,1];
my bad..
chad
On Sat, 2002-12-07 at 12:11, Mark Weisman wrote:
> I've got a script that I'm working on that will use SSH to check the
> uptime on servers within my domain. However, I'm unsure of how
Mark,
It may be easier to go by route of the Net::SSH::Perl module or
Net::SSH module
#!/usr/bin/perl
use strict;
use warnings;
my $user = "bob";
my @hosts = "host1, host2, host3, host3";
foreach my $host (@hosts) :
my $cmd = "/usr/bin/uptime";
my $ssh = Net::SSH::Perl->new( $host, po
stuff.
Nad keep all the print statements in the scri[pt..
Can anyone offer any suggestions??
Thanks,
--chad
--
chad kellerman <[EMAIL PROTECTED]>
signature.asc
Description: This is a digitally signed message part
is there. What else can I use for the "*" so that
it will read the mail direcotry for a user?
Thanks for the help,
--chad
--
chad kellerman <[EMAIL PROTECTED]>
signature.asc
Description: This is a digitally signed message part
== 0) {
> #do some perl stuff
>}
> elsif($pid < 0) {
> #do some other perl stuff
>exit(0);
> }
> waitpid($pid,0);
>
>
> Daryl J. Hoyt
> Software Engineer
> Geodesic Systems
> 312-832-2010
> < http://www.geodesic.com>
>
Hey guys,
I maybe misunderstanding what a fork can do, so I thought I would
write in to verify. Because it doesn't appear to be doing what I want
(think it should).
I have a script that tars (unix) directories. I want the script to tar
directories [a-n] as it is tarrring up [a-n] I want it
Hi guys,
I have a piece of code that executes a command at a remote server
and writes the output to stdout. It there a wat to write stdout as it
is being written and not have to wait for it to be completed.
I know it's kinda hard to understand but here is the portion of
code:
use Net::
te?
I am think I have to fork the tar, but I am not too sure if this
would be the best approach.
thanks for the help.
--chad
--
Chad Kellerman
Jr. Systems Administrator
Alabanza Inc
410-234-3305
signature.asc
Description: This is a digitally signed message part
Hi everyone,
I know there must be a easy way to do this but I just can't figure it
out.
I issue a command from a remote server and get a variable like so:
my $out = 14G; # actually it's 14G\n
I am trying to get just a numeric out oif it:
I just want the 14:
I have been tried a lot of things
japhy,
you are correct. That it what I wanted to convey. But with
everyone's input I understand what I was missing.
thanks again,
chad
On Tue, 2002-10-15 at 12:59, Jeff 'japhy' Pinyan wrote:
> On Oct 15, Rob said:
>
> >From: "chad kellerman" &l
Hello,
I wrote a script that goes thru the a access logs of a web server
and prints out the hour and number of hits/hour. THe only problem is
that if i use warnings I get a bunch of errors when I count the hits.
Use of uninitialized value in addition (+) at scripts/hits.pl line 14,
line 20
Videos & More
> http://faith.yahoo.com
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
Chad Kellerman
Jr. Systems Administrator
Alabanza Inc
410-234-3305
signature.asc
Description: This is a digitally signed message part
Hello again,
I am using getOpts::Std, with a -e option where you have to emter in
your email address. How can I do checking on that address. I am trying
to verify the domain as well as the user.
Here is what I have but I don't know how to contiue:
getopts("d:s:e;h"); # colons take arg
My bad. I got it. I had
getopts("ds:h");
and not
getopts("d:s:h");
Sorry for posting something so stupid.
chad
On Thu, 2002-10-10 at 08:16, chad kellerman wrote:
> Hi everyone,
> Just started a little script I an am not too sure what I am doing
> wong.
Hi everyone,
Just started a little script I an am not too sure what I am doing
wong. I am just testing my opts to make sure they are what I want.
Trying to maake a script "dummy prooof"
Here is what I got:
use Getopt::Std;
our ($opt_h, $opt_d, $opt_s);
if ($opt_h) {
print "Usage: $0 -
Perl gurus,
I was wondering if there is a one liner that searches a file for a
string and then removes that line and the following four lines in the
file?
Thanks,
Chad
--
Chad Kellerman
Jr. Systems Administrator
Alabanza Inc
410-234-3305
signature.asc
Description: This is a digitally
Hi everyone,
What would be the easiest way to find the uptime of a linux
machine? I don't want to use a system call. Is there a module I can
use? Or do I have to open /proc/uptime and calculate it thru there?
Thanks for the help..
Chad
--
Chad Kellerman
Jr. Systems Administ
Hi,
I was wondering if someone can shed some light on a problem I am
having. I have a sub routine that forks each variable in an array one
at a time. But after the last element in the array the program exists
from the sub routine, it does not continue after the the last element
in the arra
david,
actually, without the while loop every user in the array gets forked
at one time. 500+ forks. I put the while loop in and it does one at a
time..
chad
On Thu, 2002-09-26 at 14:28, david wrote:
> Chad Kellerman wrote:
>
> > I have:
> >
> > foreach my $usr
>
>
> Is forking neccessary? Why not just check for the existence of the directory
> and tar it up.
> can you post the complete script?
>
>
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
}
> >waitpid($oUsrPid,0);
> > }
>
>
> >
> > This is in a sub routine. But after it does stuff with $Usr it
> > exists out of the sub and goes to the next one. IT does not contiue
> > with the if (define @otherusers).
>
> THAT is because you code is telling it to that :-)
>
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
Chad Kellerman
Jr. Systems Administrator
Alabanza Inc
410-234-3305
signature.asc
Description: This is a digitally signed message part
help.
--chad
--
Chad Kellerman
Jr. Systems Administrator
Alabanza Inc
410-234-3305
signature.asc
Description: This is a digitally signed message part
Hello everyone,
I am sure this is a newbie question but I have never had to do this
in a script and I am not quite too sure if I can.
Is there a way I can "mark" a part of a script so that, if I wrap an
eval around a particular statement I can go back to that mark and retry
it.
I have t
Frank-
I think he believes it's more of a security issue then anything
else. We only have three os's here. Solaris x86, Solaris sparc, and
linux. So I don't think it's a port issue.
--chad
On Fri, 2002-09-20 at 15:49, Frank Wiles wrote:
> .--[ chad kellerm
to do that, especially using find..
-chad
On Fri, 2002-09-20 at 15:01, david wrote:
> Chad Kellerman wrote:
>
> > Dave,
> >
> > Actually in each fork. I was tarring up information from another
> > server with Net::SSH::Perl. The full tar ball was written
?
--chad
On Fri, 2002-09-20 at 14:07, david wrote:
> Chad Kellerman wrote:
>
> >
> > here's my $.02 on this subject. Correct me if I am wrong.
> > Once perl uses memory it does not want to let it go back to the system.
> > I believe I have read the the dev
here's my $.02 on this subject. Correct me if I am wrong.
Once perl uses memory it does not want to let it go back to the system.
I believe I have read the the developers are working on this. Since you
have your script running as a daemon. It will not release a lot of
memory back to the syste
Hello everyone,
I think I am getting the hang of using perl, just rough around the
edges. I was hoping you guys can give me a hand. Here is my issue.
>From what I understand using global variables such as my #variable; it
not the most "proper" way of coding. I ran into a problem that I ca
Jason,
I am using Parallel::ForkManger for a similar project. I works great
except you cannot call a fork in a child process using the perl module.
I actually had to use fork. But other then that it works great.
chad
On 19 Sep 2002 10:48:47 -0400
Jason Frisvold <[EMAIL PROTECTED]> wrote
Greetings,
I have a script that forks 5 children. I print to screen when each
child gets forked. Under certain conditions in the script a child
should sleep. This conditions occurs at different times for each child.
I think I am noticing that when the sleep is called in a child,
ever
<[EMAIL PROTECTED]> wrote:
> On Wed, Sep 11, 2002 at 12:17:55PM -0400, Chad Kellerman wrote:
> > my @list = "bla, bla, bla, bla, bla";
>
> You probably meant @list = ("bla", "bla", "bla", "bla", "bla");
>
>
&g
Hey,
I got a script that I use Parallel::ForkManager, which works
great...
the only problem is that I want a child to fork another process and
Parallel::ForkManager does not allow that.
So for my first fork I use it but in the child I am trying to use the
normal oreilly FORK but I am missi
Hello,
I have a subroutine that declares a variable from standard out. If I
just undef that variable will that free up the memory that it used? Or
is there another command that frees up memory?
THanks for the help
--chad
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional command
Hello,
I am having issues with writing standardout to disk. ( in chunks) I
have a small backup script that runs. It uses Net::SSH::Perl to send a
tar command to the hoem directory of a server. The tar command pipes
eveything to STDOUT, on the backend I write that STDOUT to disk.
Everything
Hello Everyone,
I got a script that spawns off a few children. But for some reason
before the children are finished doing what they are suppose to do they
die.
code:
use POSIX "sys_wait_h";
my $child_limit = 1;
my $child_pids = 0;
$SIG{CHLD} = \&CHILD_COUNT;
FORK:
{
Hey guys,
Having an issue with Net::SSH:Perl and eval.
Is there another way to write this? Or am I just missing something?
my $ssh;
eval {
alarm 10;
$ssh = Net::SSH::Perl->new($host_ip,
identity_files =>["$id_key_fn"
ote:
> > -Original Message-
> > From: Chad Kellerman [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, August 27, 2002 8:58 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: eval on a $SIG{KILL}- newbie question
> >
> >
> > Bob,
> > Thanks f
2 08:41:31 -0400
Bob Showalter <[EMAIL PROTECTED]> wrote:
> > -Original Message-
> > From: Chad Kellerman [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, August 27, 2002 8:33 AM
> > To: [EMAIL PROTECTED]
> > Subject: eval on a $SIG{KILL}- newbie question
>
Hello,
I am writing a script on a linux server use Net::SSH::Perl. Every
once in a while the ssh connection to a remote server dies or it just
can't connect. the perl module send a $SIG{KILL} to the script when
ever this happens. Which isn't what I want. I am trying to put the
kill in an e
Good morning, afternoon, night,
I have been trying to work on a script that does forking. But
the script dies in the fork. Here is what I have:
I push some information about a server into an array.
use POSIX "sys_wait_h";
my $child_limit = 1;
my $child_pids = 0;
$SIG{CHLD} = \&CHILD_
Hello,
I have only been writing perl for a few months, so forgive me if this
sounds stupid.
what is the difference between:
$| = 1;
and
$|++;
Or can you point me in the right direction on where I can read
boutit?
Thanks,
Chad
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For addition
Hey guys,
I was working on a disk usage script. Mainly using stat like DAn had
in an earlier posting. Buit when I saw Janek post I thought, "That's
perfect, Just what I was doing but about 8 lines less." I incorporated
it into my script but the waring message I can't figure out. I am kind
Hello,
Ok, I made a newbie mistake and I hope I don't have to go back and
change my code.
I wrote a script that talks to a Mysql database. I created a table
called hostname.
I created a subroutine to send email messages when that is any errors as
well as log them to the db.
Problem is
Hello everyone,
I am not too sure if this is the place to send this question or not,
but here it goes anyway:
I have a script that uses the Net::SSH::Perl modules for connecting
to a server. I connect and grab all the databases and put them into an
array. Latter in the script I run a f
Dave,
I did it this way
$variable = substr($orig_variable,0,length($orig_variable)-2);
I actually only removed the last 2 characters but I don't see why you
could not put a 4 and remove last four..
I am sort of new at perl but I did get the above to work. I needed
to drop off 2 n
Hello,
Boy this stuff can get frustrating
I am trying to include my own perl module that is outside the regular @INC
array. But my perl script still can not find it.. Any suggestions would be
appreciated...
Here is what I have...
script.pm
package Script;
BEGIN {
use Expo
Hi everyone,
I am stuck. I have a perl script that I wrote. It runs on a Solaris 8
box and goes out to linux boxes and tars up user data and mysql data and
stores it on particular drives of the sun box.
Right now the script only goes out and tars up one server at a time. I was
think
se z as part of your tar command? (E.g. tar zcpf) no -
> in the command.
>
> Regards,
> Jaimee
>
> -----Original Message-
> From: chad kellerman [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 14, 2002 7:14 AM
> To: [EMAIL PROTECTED]
> Subject: Backup scrip
Hello everyone,
I am a little new to perl. I am writing a little backup script using
Net::SSH:Perl, Compress::Zlib and FileHandle.
I am just tarring up users in the home directory. ( Ohh I am runnng Linux)
I have most of the script working except Compress standard out from my ssh comman
66 matches
Mail list logo