Friendly router geek wanting to be a programmer here...
So I worked with another guy here and came up with this to capture Unix admin data:
But once the script runs, it leaves processes still running as shown:
Can anyone explain why this is?
Well knowing what OS you are running may help a bit...
the top I see is the standard top utility?
Why initialize LD_LIBRARY since you are not using it ( I may be wrong but I see no program here that needs it... or I missed it... Ah and in ksh you can export straightaway VARIABLES export VAR=value ...)
Sorry for not giving the OS, I am running Solaris 2.10
but i think I have found the issue.
The top command I am using was suggested by another tech.
In taking it apart, I found that the "-d" flag sets a refresh rate. but I only want the instance of top to run once per command line in the script. I don't want it to refresh.
So I changed the "-d1" to "-n1" as "-n" controls the number of iterations top carries out.
that is a great idea for improving the efficiency of the script, and I am looking into tweaking it to make it better now I've got it working. My boss has approved it for beta deployment in our lab and I am pleased at what I'm learning
Source
a quick google search making clear that this isn't really new, and if we look at our bsd Forum we see that its the only operation systems forum with the last comment dated to June last year, whereas all the others have more recent comments.
One comment dated to 2014 is exactly what I... (10 Replies)
Hello All,
SNMPD dying after 2 mins once it started. Here is the configuration
Oct 12 04:43:00 localhost systemd: Starting Simple Network Management Protocol (SNMP) Daemon....
Oct 12 04:43:00 localhost snmpd: dlopen failed: /usr/lib64/libcmaX64.so: cannot open shared object file: No such... (1 Reply)
I have an Ubuntu machine that I'd like to update automatically. I've written an expect script to run the aptitude package manager and update my packages. Essentially it does:
aptitude update && aptitude upgrade while answering "yes" at the appropriate time.
It works quite nicely when run... (4 Replies)
Hi,
(First post, please be gental!)
I have a java app that I am running on unix (centos)
But it keeps dying randomly. The times seem random from anything between 3 hours and 3 days.
I have a cronjob running to restart it when ever it dies but I would rather this happened less often.
... (2 Replies)
hie guys
I am running fedora 6 on remote machines which are connecting to my server. The remote machines connect through one machine (more like my router) to the server. The problem i am having is that the remote machines are suppose to be reporting in real time mode to the server. Most of these... (2 Replies)
For some reason after a while my internet connection dies. I just moved on to Debian from Ubuntu and I can't find the dhclient-program to reconfigure dhcp. Pretty new to *nix's. ONe thing I noticed while rebooting (do get my connection back) is that it configures dhcp and says: reconfigure (or... (1 Reply)
Hi all ---
I have the need to manage multiple versions of a set of utility scripts -- both shell and SQL and other .dat files. I am wondering if anyone out there knows of a good way to "PATH" to SQL and text files in a way similar to how PATH facilitates finding executables in a pre-specified... (2 Replies)