Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 03-02-2005, 10:02 AM   #1
Registered: Dec 2004
Posts: 110

Rep: Reputation: 16
Any Perl/CGI programmers wana make a few quick bucks?

I have a Netbackup log file that I need to extract the info from for multiple machines (Start/End/Size/Files/Type/BackupID/Total Backup Time) and display the results in a web page.

I've been working on this but I honestly just have too much to do and don't want to dork with it if I can get someone else to do it. (I'm middle management, can you tell?)
Old 03-02-2005, 10:30 AM   #2
Registered: Jun 2003
Location: Toronto, Ontario, Canada
Posts: 288

Rep: Reputation: 30
Can you post a snippet of the log file? Maybe I can write something quickly in Python.

(or send it to my email: coolman0stress at gmail dot com)
Old 03-02-2005, 10:34 AM   #3
Registered: Dec 2004
Posts: 110

Original Poster
Rep: Reputation: 16
Log file is 200MB large.

I don't know how to work in Python and as I would need to maintain it it has to be written in something I can manipulate.

Perl/CGI/Shell Scripting -- whatever.

I don't do Python though.

Still interested?

It's only 8 fields in that 200MB log that I need which sucks and I need this info to be cataloged and displayed to a webpage for reference.
Old 03-02-2005, 10:42 AM   #4
Registered: Jun 2003
Location: Toronto, Ontario, Canada
Posts: 288

Rep: Reputation: 30
Damn, that's one big log file. Might take a lot of time to display it in raw like that.

I can probably do it, but I haven't done Perl in so long. Perl is also the reason why I moved to Python in the first place

Time to revisit some notes!
Old 03-02-2005, 12:09 PM   #5
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 124Reputation: 124
If the file is uniform, a handful of line sample should be sufficient to work from. I could probably whip something up with a little time. What kind of output are you looking for?
Old 03-02-2005, 12:11 PM   #6
Registered: Dec 2004
Posts: 110

Original Poster
Rep: Reputation: 16
nstead of just givign you the whole log file, howabout I give you
just the lines that I need and you can figure out how to munge them to
fit what we need to do?

Here's the run down. Each night I want to have my machines scp this
log file to a central machine that will extract this info from each
machine log and save it in a machine specific logfile.

IE: Machine A & Machine B

Machine A

scp /usr/openv/netbackup/logs/bpbkar/030205.log

Then Munge that long to extract the 8 fields and place it into a new
log and remove the HUGE log.

Then I need a web page that is organized by machine that will read in
the log files from the directories and display them as HTML.

[root@diam-ora-central NBU-Web]# grep BACKUPTIME log.030205 | grep -v
00:04:31.063 [5391] <4> bpbkar main: INF - setenv BACKUPTIME=Wed Mar
2 00:03:52 2005

[root@diam-ora-central NBU-Web]# grep FINISHED log.030205
00:33:15.485 [5391] <4> bpbkar Exit: INF - setenv FINISHED=1

[root@diam-ora-central NBU-Web]# grep "Total Size" log.030205
00:32:56.439 [5391] <2> bpbkar main: INF - Total Size:655617055 + 1GB

[root@diam-ora-central NBU-Web]# grep PrintFile log.030205 | wc -l

[root@diam-ora-central NBU-Web]# grep logparams log.030205
00:04:31.057 [5391] <2> logparams: bpbkar32 -r 1814400 -ru root -dt
86410 -to 0 -clnt hrnpdb2 -class Southfield_Linux -sched 1_Son_Sets
-st INCR -bpstart_to 300 -bpend_to 300 -read_to 300 -ckpt_time 900
-blks_per_buffer 127 -tir -tir_plus -use_ofb -b hrnpdb2_1109739832 -kl
28 -fso

Backup ID:
[root@diam-ora-central NBU-Web]# grep BACKUPID log.030205
00:04:31.063 [5391] <4> bpbkar main: INF - setenv BACKUPID=hrnpdb2_1109739832

Let me know.

Old 03-02-2005, 12:31 PM   #7
LQ Guru
Registered: Mar 2004
Distribution: Slackware
Posts: 5,390

Rep: Reputation: 409Reputation: 409Reputation: 409Reputation: 409Reputation: 409
How much bucks ?

You could use a database to store your infos as fields
(good to make queries like search, stats...)
Old 03-02-2005, 12:42 PM   #8
Registered: Dec 2004
Posts: 110

Original Poster
Rep: Reputation: 16
Well this isn't brain science work, it's just simple stupid code that I don't have the time to do that we're in need of, so I don't plan on offering MUCH. Maybe 50 or 100 depending on the quality of the work.

I don't know squat about SQL so a DB would be problematic.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Perl cgi Script can`t make file.Why? ZairSadiqov Linux - Software 1 11-22-2006 07:22 AM
Need a couple of perl programmers SkipHuffman Programming 1 11-01-2005 05:09 PM
Looking for freelance perl programmers General 1 09-16-2004 08:15 AM
cgi perl : I cant get perl to append my html file... the_y_man Programming 3 03-22-2004 05:07 AM
How to make perl cgi run in my Debian SID epic Linux - Networking 0 12-03-2001 09:32 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:47 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration