i have a logfile which is continuously being updated. I have built a script to check for a specific content and if it is found, it sends a string into a file. Here's the current script:
As you can see i am continuously reading from the "server.log" file and while reading each entry, if the "grep" command find the matched string it echoes to file, else it echos to the same file but with a different string (YES or NO).
However i noticed that when the end of the day is reached, i.e @ 23:59, the file "/home/nms/Disconnection_oldstack.txt" stops updating. I noticed that the "server.log" file closes and a new one is reopened at that time, here below:
i tried to add
in the beginning of the script so it sleeps if file is does not exist (since i thought that at the time of the file rotation it stops since the file is not found), but the same thing happened.
Am i missing something?
Note: The output redirection to file is necessary in this case so i need to stick to that!
Hi,
I am trying to find the content of file using grep and find command and list only the file names
but i am getting entire file list of files in the directory
find . -exec grep "test" {} \; -ls
Can anyone of you correct this (2 Replies)
Hi ,
I have a file called "X" . the content of X are
X
--
abc
def
and i have a file called "Y" , the content of Y are
Y
--
erty
sdss
s
abc
sfs
def
I need to check if the content of file X is contained in Y.Only unix (7 Replies)
Hi, I have a file called fl_list consists of files i have to archive. I want to create a exception parm called except_parm, so if it finds the directory it will not archive these files and remove from fl_list.
$ cat fl_list
/apps/dev/ihub/ready/IA003B/IA003B_Deal_Header_yyyymmdd_hhmmss.txt... (1 Reply)
Hi All,
I would like to print the content from the specific line of a file .
For example... i have file abc.txt which has 100 lines of code ,from this file i would like to print the content from 20,19,18th line......like that
Regards
Srikanth (4 Replies)
Hi
I have a large text file and I want to split its content into multiple flies.
this large file contains several blocks of codes separated by a comment line for each block.
this comment line represents a directory path
So, when separate these blocks each into a separate file, This output... (7 Replies)
Hi All,
I have the file in this format
**** Results Data ****
Time or Step
1
2
20
0.000000000e+00 0s 0s 0s
1.024000000e+00 Us 0s 0s
1.100000000e+00 1s 0s 0s
1.100000001e+00 1s 0s 1s
2.024000000e+00 Us Us 1s
2.024000001e+00 ... (7 Replies)
I have some users in one unix system and i want to search some files with specific to user and then i want to find some content inside that file so can u help me how we can implement it?
File location is as below.
/pools/home_unix/cmadireddy/work/models/model/
cmadireddy is user name.
now... (6 Replies)
Hi All,
I m very new to unix...i jus want to chk the content of file.
ma requirement is
if file has a content then
display it
else
dont display or something
pls specify which loop shalli use either for or while?? (20 Replies)
Hi,
This is a bit lengthy problem, i will try to keep explaining it simple.
I have got a file say file1 that contains the following in it,
------------------------------------------------------------------------ r201463 | ngupta@gmail.com | 2012-06-19 22:02:20 +0530 (Tue, 19 Jun 2012) |... (3 Replies)
Discussion started by: Kashyap
3 Replies
LEARN ABOUT DEBIAN
ocf_heartbeat_jboss
OCF_HEARTBEAT_JBOSS(7) OCF resource agents OCF_HEARTBEAT_JBOSS(7)NAME
ocf_heartbeat_jboss - Manages a JBoss application server instance
SYNOPSIS
jboss [start | stop | status | monitor | meta-data | validate-all]
DESCRIPTION
Resource script for Jboss. It manages a Jboss instance as an HA resource.
SUPPORTED PARAMETERS
resource_name
The name of the resource. Defaults to the name of the resource instance. (unique, optional, string, default default)
console
A destination of the log of jboss run and shutdown script. (unique, optional, string, no default)
shutdown_timeout
Timeout for jboss bin/shutdown.sh. We wait for this timeout to expire, then send the TERM and QUIT signals. Finally, the KILL signal is
used to terminate the jboss process. You should set the timeout for the stop operation to a value bigger than the sum of the timeout
parameters. See also kill_timeout. (optional, integer, default 5)
kill_timeout
If bin/shutdown.sh doesn't stop the jboss process, then we send it TERM and QUIT signals, intermittently and once a second. After this
timeout expires, if the process is still live, we use the KILL signal. See also shutdown_timeout. (optional, integer, default 10)
user
A user name to start a JBoss. (optional, string, default root)
statusurl
URL to test in the monitor operation. (optional, string, default http://127.0.0.1:8080)
java_home
Home directory of Java. Defaults to the environment variable JAVA_HOME. If it is not set, then define this parameter. (optional,
string, no default)
jboss_home
Home directory of Jboss. (unique, required, string, no default)
pstring
With this string heartbeat matches for the right process to kill. (optional, string, default java -Dprogram.name=run.sh)
run_opts
Start options to start Jboss with, defaults are from the Jboss-Doku. (optional, string, default -c default -l lpg4j)
shutdown_opts
Stop options to stop Jboss with. (optional, string, default -s 127.0.0.1:1099)
SUPPORTED ACTIONS
This resource agent supports the following actions (operations):
start
Starts the resource. Suggested minimum timeout: 60s.
stop
Stops the resource. Suggested minimum timeout: 120s.
status
Performs a status check. Suggested minimum timeout: 30s.
monitor
Performs a detailed status check. Suggested minimum timeout: 30s. Suggested interval: 10s.
meta-data
Retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5s.
validate-all
Performs a validation of the resource configuration. Suggested minimum timeout: 5.
EXAMPLE
The following is an example configuration for a jboss resource using the crm(8) shell:
primitive p_jboss ocf:heartbeat:jboss
params
jboss_home=string
op monitor depth="0" timeout="30s" interval="10s"
SEE ALSO
http://www.linux-ha.org/wiki/jboss_(resource_agent)
AUTHOR
Linux-HA contributors (see the resource agent source for information about individual authors)
resource-agents UNKNOWN 03/09/2014 OCF_HEARTBEAT_JBOSS(7)