Search Results

Search: Posts Made By: coolguyamy
3,156
Posted By coolguyamy
Hello , Thanks for the response. My...
Hello ,

Thanks for the response.

My file contains following line in it.


<May 2, 2012 1:14:50 PM MEST> <Error> <HTTP> <BEA-101214> <Included resource or file...
3,156
Posted By coolguyamy
Shell Variable in Curly Brackets Returns Empty Value
Hello Team,

I have a script which will grep for a time from a file. I have following code to grep for a time in a file.


node=`hostname`

current_date=`date`

file11=weblogic.log
...
2,639
Posted By coolguyamy
Hello mtomar, Thanks for the response....
Hello mtomar,

Thanks for the response. Actually my script is also working fine. I need only modifcation in such a way that if any of the port out of 1200,1201 or 1199 is not listening then it...
2,639
Posted By coolguyamy
Modification in shell script
Hello Team,

I have prepared script which will check for listening message for ports 1199,1200 and 1201. I need modifcation in script in such a way that if port 1200 is not listening then it should...
3,771
Posted By coolguyamy
Thanks a lot Rohan, The below ecript is working...
Thanks a lot Rohan, The below ecript is working fine now.

#!/bin/bash
c=1
while [ $c -le 6 ]
do
echo "Enter the tomcat as tomcat1,tomcat2,tomcat3,tomcat4,tomcat5,tomcat6 or q for exit"
read...
3,771
Posted By coolguyamy
How to come out of while loop?
Hello Team,

I have prepared script using while loop which will run until six counts and will stop after six counts. I would like to improve the script to come out of loop anytime. Can someone...
153,737
Posted By coolguyamy
Thanks a lot Anurag,It's really working fine.
Thanks a lot Anurag,It's really working fine.
153,737
Posted By coolguyamy
awk command to print multiple columns
Hello Team,

I have written following command which is giving output is as shown below.

bash-3.00$ grep -i startup catalina.out | tail +2 | sed -n 1p | awk -F" " '{ for (x=1; x<=5; x++) { ...
7,706
Posted By coolguyamy
grep startup messages from catalina.out file
Hello Team,

I am trying to extract date from the following output and trying to compare with current date and if there is 10 minute difference between the two. it should logs message in the file...
17,348
Posted By coolguyamy
shell script to grep 500 error messages from access logs
Hello Team,

I need help to improve my script which is used to grep 500 error messages in the logs.

I am using following logic in the script to grep 500 error messages in the logs.

var1=`awk...
6,748
Posted By coolguyamy
Hello scottn, Thanks for the script. Is it...
Hello scottn,

Thanks for the script. Is it possible to know if script is grepping for latest outofmemory error messages and not sending old messages. Also if there is not latest outofmemory...
3,066
Posted By coolguyamy
Hello cabrao, I have ran the command and i...
Hello cabrao,

I have ran the command and i am getting following error in the output

bash-3.00$ awk 'NR==1{print $1,$2,$3}' SystemOut.log_bak14122010
************ Start Display
awk: record...
3,066
Posted By coolguyamy
Format output from the file to extract "date" section
Hello Team ,

I have to extract date section from the below file output. The output of the file is as shown below.



I have to extract the "[12/14/10 14:43:03:732 CET]" this section from the...
6,748
Posted By coolguyamy
Hello scottn, Actually I was having...
Hello scottn,

Actually I was having requirement to grep for latest outofmemory message from the logs and send an lert if it is there. The code which i was using it tail 10 lines of logs and grep...
6,748
Posted By coolguyamy
Hello Scottn, Thanks for the response. I...
Hello Scottn,

Thanks for the response. I have ran the command and it's giving java heap space as output.

can you please tell me how to get outofmemory from the output.

bash-3.00$ echo...
6,748
Posted By coolguyamy
Hello Rohan, I have tried sugesstion by...
Hello Rohan,

I have tried sugesstion by Anurag and i am getting following output now.

bash-3.00$ echo "$error" | sed 's/.*: \( .*\)$/\$1/g'
[12/14/10 14:46:15:086 CET] 00000041 webapp E...
6,748
Posted By coolguyamy
Hello Anurag I am not getting any output for...
Hello Anurag

I am not getting any output for that command and just getting sed command garbled error.

bash-3.00$ echo $error | sed 's/.*:(.*)$/\1/g'
sed: command garbled: s/.*:(.*)$/\1/g...
6,748
Posted By coolguyamy
Hi, I am getting following error. bash-3.00$...
Hi, I am getting following error. bash-3.00$ echo $error | sed 's/.*:(.*)$/\1/g' sed: command garbled: s/.*:(.*)$/\1/g bash-3.00$

If you continue not to use code tags, you may find yourself...
6,748
Posted By coolguyamy
Hello Rohan, Thanks for your quick reply. ...
Hello Rohan,

Thanks for your quick reply.

I ran each command in the script.

error=`grep -i outofmemoryerror file | tail -1`

I got the below output.



Then i ran below command i got...
6,748
Posted By coolguyamy
Hello Anurag, Thanks a lot for your...
Hello Anurag,

Thanks a lot for your response. My system logs will contain out of memory message in below format.

My requirement is script should search entire file for the outofmemory error...
6,748
Posted By coolguyamy
script to grep latest outofmemory string from the logs
I have requirement to prepare script which will grep for latest outofmemory message from the logs. I have used following command to grep the string from the logs,this script is not effective when...
8,624
Posted By coolguyamy
Thanks for the response anurag.script is really...
Thanks for the response anurag.script is really working fine.
8,624
Posted By coolguyamy
Thanks Anurag, This is perfectly working...
Thanks Anurag,

This is perfectly working fine. I need one more help,Is it possible to email alert if it cpu has crossed the threshold value.and also when cpu is under threshold it should write the...
8,624
Posted By coolguyamy
Hello Anurag, Thanks for the response. I...
Hello Anurag,

Thanks for the response. I replaced the value variable with value 6 and i am getting following error.

I need one more update in script if cpu is below threhold value the output...
8,624
Posted By coolguyamy
shell script to format command output
Hello team,

I am running below command which is giving following output.

bash-3.00$ ps -eo pid,pcpu,args | sort +1n | grep -i java
12 0.0 grep -i java
8804 0.0...
Showing results 1 to 25 of 44

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