kilimanjaro has asked for the wisdom of the Perl Monks concerning the following question:
______top - 14:19:45 up 3 days, 12:33, 1 user, load average: 4.20, 4.27, 5 +.08 Tasks: 97 total, 1 running, 96 sleeping, 0 stopped, 0 zombie Cpu(s): 12.0% us, 21.2% sy, 0.0% ni, 65.9% id, 0.1% wa, 0.0% hi, 0 +.8% si Mem: 3765572k total, 3663796k used, 101776k free, 42856k buffe +rs Swap: 2031608k total, 368k used, 2031240k free, 3141516k cache +d
#!/usr/bin/perl -w use strict; use DBI(); my $cdr_log_file = "/var/log/asterisk/my_log"; my $mysql_host = "localhost"; my $mysql_db = "user"; my $mysql_table = "tbl_data"; my $mysql_user = "user"; my $mysql_pwd = "xxx*"; #my @ARGV; my $insert_str; my $sth; my $cdate=$ARGV[0]; my $clang=$ARGV[1]; my $csrc=$ARGV[2]; my $ccode=$ARGV[3]; my $cuniqueid=$ARGV[4]; # Connect to database # print "Connecting to database...\n\n"; my $dbh = DBI->connect("DBI:mysql:database=$mysql_db;host=$mysql_host" +,"$mysql_user","$mysql_pwd",{'RaiseError' => 1}); $insert_str = "insert into $mysql_table (data1, data2, data3, data4, d +ata5) values (\"$cdate\", \"$clang\", \"$csrc\", \"$ccode\", \"$cuni +queid\");\n"; $sth = $dbh->prepare($insert_str); $sth->execute(); # print "."; $sth->finish(); $dbh->disconnect(); exit;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Memory Leak: Uses 3GB+
by almut (Canon) on Jan 15, 2009 at 12:52 UTC | |
Re: Memory Leak: Uses 3GB+
by shmem (Chancellor) on Jan 15, 2009 at 13:19 UTC | |
Re: Memory Leak: Uses 3GB+
by BrowserUk (Patriarch) on Jan 15, 2009 at 12:54 UTC | |
Re: Memory Leak: Uses 3GB+
by targetsmart (Curate) on Jan 15, 2009 at 12:58 UTC | |
Re: Memory Leak: Uses 3GB+
by vek (Prior) on Jan 15, 2009 at 21:19 UTC | |
by kilimanjaro (Initiate) on Jan 17, 2009 at 10:03 UTC | |
by BrowserUk (Patriarch) on Jan 17, 2009 at 10:57 UTC | |
by kilimanjaro (Initiate) on Jan 17, 2009 at 14:17 UTC | |
by kilimanjaro (Initiate) on Jan 17, 2009 at 15:49 UTC | |
by BrowserUk (Patriarch) on Jan 17, 2009 at 16:10 UTC | |
by Corion (Patriarch) on Jan 17, 2009 at 16:21 UTC | |
Re: Memory Leak: Uses 3GB+
by targetsmart (Curate) on Jan 29, 2009 at 07:19 UTC | |
Re: Memory Leak: Uses 3GB+
by weismat (Friar) on Jan 29, 2009 at 07:31 UTC |