I think this bit will loop forever. Neither variable changes within the loop.
I'm not sure what you mean, there are two loops, the while true loop and the until loop.
All the until loop does is every 30 minutes check if the dates match or not. Once they do, it does all the work in the while loop which includes updating the dates:
Every time the red part completes, it does the blue part which includes updating the variables that red relies on.
---------- Post updated at 12:56 PM ---------- Previous update was at 12:44 PM ----------
Quote:
Originally Posted by Corona688
How many CPU cores does the system have? On a one-core system there's no advantage to running multiple gzips in parallel, since each will be running half as fast. On a four-core you could run four. etc. There's also the question of disk speed -- your disk can probalby keep up with 1 running gzip easily, but how about 4, or 8? And having four different large files being written to disk simultaneously is a recipe for bad fragmentation. There's also the question of memory use, potentially unlimited if you have a huge number of files.
The point? Don't go too nuts. A few may help, dozens probably won't. You may also want to create the file in temp space then move it once complete, to avoid too much fragmentation on the main filesystem. You'll want a way to limit the number of processes created, create n processes for n cores then start waiting for individual processes before creating another.
I'd also note you might want a way to check whether a background compression succeeded or failed. Again, you can tell this by wait-ing for a specific background PID.
Well my main concern isn't having multiple zips going on at the same time. I mean it should only be zipping the file once a day, and I highly doubt that by the time the next zip comes around the last one will still be running.
My concern is that I don't want the next instance of tcpdump to have to wait for the zip to complete. I wanted the zip to run in the background while the next tcpdump starts.
I decided to do some more testing on a VM on my laptop, and I noticed that unlike what I wanted, the tcpdump was waiting for the zip to complete before starting again, so I moved the ampersand inside the zipPcap function, and now it seems to be working. I'm watching the files get created in real time, and when one stops writing 2 more files appear, the .gz, and the new .pcap. Once the .gz is done, the original file gets deleted.
My testing version:
Oh, and to answer your question, the box I'm working on has 16 cores...
So far as zipping the pcap in real time...honestly, I didn't know that was an option.
I am using a telnet session (VT100) and need to modify my .profile so that it will set the color of the telnet session. I am not using Xterm (ie: can't use .Xdefaults). I am able to change the colors via menu's but need to preset in .profile. Is this possible??? Can't find anything at all on how... (3 Replies)
Hi,
I need to set the background colors for cygwin console, when I do ssh to production boxes.
This should be done through commands..
Please suggest me asap.
Thanks in advance. (3 Replies)
I have two issues with this script.
1. I cannot seem to get my counters to count correctly.
2. My function to eject to CAP1 or CAP2 is hung in a loop and doens't exit back to the previous function. I would like to be able to select which cap to eject to . Each cap holds only 40 tapes, so when one... (15 Replies)
Original code used fwrite instead of putc.
What is expected is that the destination file will be written to. Instead I end up with a zero length file. I'm sure there is something simple I'm missing.
tia.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char... (6 Replies)
Hi all,
Let me first start out by saying I'm a perl newbie and hope somebody can help, for the life of me I can't figure out why my script will not find and download a remote file via FTPSSL. What it's supposed to do is find the latest file named... (4 Replies)
In my .exrc file I have line numbers turned on but it adds an indent. I don't like this, is there a way to have the line numbers at the left edge of my terminal instead of indented? Here's my .exrc
1 set ignorecase noslowopen report=0 autoindent showmatch showmode nu
2 set... (4 Replies)
I am trying to script up a build of my system from source, and the first couple of steps requires me to do a pull from a CVS mirror three times, and then the script begins.
What I'd like is to be able to do one CVS pull, then start the build of userland, and while userland is building, pull down... (1 Reply)
Dear Friends
I want to, set the background of mail as image/colorful using scripting.
I try by send mail command but it is not working.Please give me suggestion on this. (1 Reply)