Search Results

Search: Posts Made By: Marc G
2,283
Posted By Marc G
Hi all, Tried to post this twice and it...
Hi all,
Tried to post this twice and it bounced.
My boss wanted the printed data variablized as well...for future use.
So I re-wrote the prog..in a less elegant form..but got it working.

thanks...
2,283
Posted By Marc G
Hi, I tried your updated method and it got...
Hi,

I tried your updated method and it got the machine name correctly but still is not capturing any of the data on the TENGETHERNET interfaces, and it is miss reporting the other numbers

Can...
2,283
Posted By Marc G
Hummm I copied your approach into a script...
Hummm

I copied your approach into a script test2.sh

Here are the results

"test2.sh" 19 lines, 482 characters
bash-3.2# chmod 774 test2.sh
bash-3.2# ./test2.sh
Device Name: RP/0/RP0/CPU0...
2,283
Posted By Marc G
The issue with this approach is that..as I...
The issue with this approach is that..as I said...the data I've provided is a cut down of the actual report. I a real report, there will be data from multiple devices listed.

So constantly...
2,283
Posted By Marc G
Trying to get rid of a duplicate output line...
Hi folks,

I'm trying to work on a script that will grab a router interface report and generate the numbers of "in use" and "un-used" ports per device. Right now, I've got a cut down of the report...
Forum: Solaris 03-26-2013
2,496
Posted By Marc G
well, here is the entire script as it's a test of...
well, here is the entire script as it's a test of the command functionality:

/usr/bin/ksh
vmstat 1 2 > /usr/home/mgrma/testFile
# vmstat 1 2 | nawk 'NR==4{print $NF}'
# vmstat 1 2 | awk '{print...
Forum: Solaris 03-25-2013
2,496
Posted By Marc G
Actually, Where we are getting the "99" and the...
Actually, Where we are getting the "99" and the "100", I need the "100" only

In the end, I am working on a Solaris system where "top" is not native. And it's been...stuttering for lack of a...
Forum: Solaris 03-25-2013
2,496
Posted By Marc G
Great! I'll try that as soon as I get a chance....
Great!
I'll try that as soon as I get a chance.

Any idea on why the command I used: "vmstat 1 2 | cut b-77-78 | grep -v id"
was causing a hang up?

After I entered the command via a...
Forum: Solaris 03-25-2013
2,496
Posted By Marc G
ok.... I've been reading here and also doing a...
ok....
I've been reading here and also doing a lot of research

As jlliagre says,

if I use the command:

"vmstat 1 2 | cut -b77-78 | grep -v id"
I get the following output:


85
99
now...
Forum: Solaris 03-20-2013
2,496
Posted By Marc G
Hi jlliagre! First, thanks for responding! ...
Hi jlliagre!

First, thanks for responding!

So taking from your response,
The "iowait" and "swap" CPU state are items I should not worry about

I can use the vmstat "free" column for...
Forum: Solaris 03-19-2013
2,496
Posted By Marc G
Question about details for the whole machine
Hi folks,

As I continue my self-torture [ >:) ], I've come on an interesting issue.
I now have a script that uses top on a Solaris box to gather performance data into a file for use in tracking...
2,204
Posted By Marc G
Rudi, Actually, I cut the ps results down to...
Rudi,

Actually, I cut the ps results down to what I thought was relevant

As for making the awk more efficient, I'm learning as I go here and not sure how I would combine all three items into...
2,204
Posted By Marc G
mirni We are running this on Solaris 2.10 ...
mirni

We are running this on Solaris 2.10

The cron command is:
0,15,30,45 * * * * /usr/apps/client/bin/gatherOSKPI.sh

As I had it explained by the admin that was helping me, the -q flag...
2,204
Posted By Marc G
ok, First, mirni... That was my cut and...
ok,

First, mirni...
That was my cut and paste error.
The shebang is:
#!/bin/ksh

I just missed it in the cut and paste.

Thanks for pointing that out though!
Marc

---------- Post...
2,204
Posted By Marc G
Sorry, I did not post the script as I was...
Sorry,

I did not post the script as I was not sure how much space I had.
Here it is:


# Set Default Paths
#
PATH=/usr/apps/client/bin:$PATH; export PATH...
2,204
Posted By Marc G
Odd results when my script runs from cron..
Hi folks,

So I wrote a script to run "top", "awk" out values fro the "top" and send the results to a data file.

I then set it to run in cron every 15 minutes.

Now I'm noticing that the...
1,477
Posted By Marc G
that is a great idea for improving the efficiency...
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...
1,477
Posted By Marc G
Sorry for not giving the OS, I am running Solaris...
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"...
1,477
Posted By Marc G
Utilities not dying after script run
Hi folks,

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:

#!/bin/ksh
#
#
# Set Default Paths
#...
925
Posted By Marc G
Scrutinizer had it. I'd discovered my mistake...
Scrutinizer had it.
I'd discovered my mistake on a website and tested it. I was coming back here to say I'd figured it out and saw Scru's post.

I was not adding needed white space in the command
925
Posted By Marc G
Can't see what I'm doing wrong
In: # pwd
/usr/apps/vender/data/OSKPI

I have:ls | grep 2013
-rw-r--r-- 1 root root 70 Feb 11 11:53 2-2013.dat

My code wants to either append or write new:

typeset -i...
1,451
Posted By Marc G
OK, I still don't get why the "[[]]" rather...
OK,

I still don't get why the "[[]]" rather than the "[]"

And then the sed commands.
It appears to me that the first one says:

Take the contents of "$WORKDIR/ADDPROMPTS" and swap the...
1,451
Posted By Marc G
First, thanks for answering! To be honest,...
First, thanks for answering!

To be honest, I've only ever explicitly written if statements.
So the "[]" and "[[]]" without the "if" included in the code is new to me.

To make sure I have read...
1,451
Posted By Marc G
Trying to understand a complex bit of code
Hi,

To re-introduce myself, I'm a router guy trying to learn some scripting from the examples in my work place...

In a ksh script, one of the script guys wrote the following and I am trying to...
1,261
Posted By Marc G
Thank you all for giving me the answer here! I...
Thank you all for giving me the answer here! I had not tried this on an AIX box. Only a virtual linux box and a Solaris server I have access too.
Showing results 1 to 25 of 47

 
All times are GMT -4. The time now is 02:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy