Sponsored Content
Top Forums Shell Programming and Scripting Monitor some of network services Post 302985776 by mohsen1366 on Tuesday 15th of November 2016 06:20:27 AM
Old 11-15-2016
it Solved

I write this script and it does work

Code:
#!/bin/bash
while  true
do

tcpdump -i ETH1  port 9996  >  /home/log_netflow &
pid=$!
sleep 5
kill $pid
count=`cat /home/log_netflow | wc -l `
echo $count

if  [ $count  -gt 2 ] ;  then

echo " system is working "   >>  /home/service_status

else

echo "system is down "   >>  /home/service_status
/etc/init.d/netflowd  restart
fi

done



Moderator's Comments:
Mod Comment Please use CODE tags as required by forum rules!

Last edited by RudiC; 11-15-2016 at 07:33 AM.. Reason: Changed [B] to CODE tags.
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Long Delay if any with network services

While installing a firewall, I was pinging the interface from SCO 5.0.6 Openserver box, while no response, I hit "DEL" to cancel, but no cancel. Then all of a sudden I get BOO-KOO traffic lights on HUB and Switch.... Then a kernel trap error. System froze... Proceeded with a cold boot. Now I have... (8 Replies)
Discussion started by: nashvillek5
8 Replies

2. IP Networking

stopping and starting network services

Solaris v5.6 how do you stop and start the network services? (4 Replies)
Discussion started by: Westy564
4 Replies

3. UNIX for Dummies Questions & Answers

Search for network services

OK I am a complete newbie to Unix. We have a Sunfire V890 running SUNOS Release 5.9. The Operating Environment is Solaris 9. I have been tasked with determining whether or not specific network and solaris services are enabled or disabled. If the services are enabled I need to disable them. I'm... (12 Replies)
Discussion started by: coachgt1
12 Replies

4. HP-UX

how can I get network services

Hi Is there a cmd in hpux 11 to get the network services the network services must display "Listen" like command netstat -an |grep Listen and display the process that is running on a port in HP-Unix at the same time my request can not use lsof -i command,not to install any extral... (2 Replies)
Discussion started by: alert0919
2 Replies

5. Programming

Help in developing a Network Appliation to monitor pc in a network

I am developing a Network Appliation to monitor computers in a network. Specs are App monitors the current web page viewed in each system App also can shutdown the computer in the network App can show all process run by each computer in the network I am now confused how to start my... (2 Replies)
Discussion started by: valaparambil88
2 Replies

6. IP Networking

Oracle network services

i have installd oracle 10 on Solaris 10 now i want to access this database from remote machine. -bash-3.00$ tnsping 192.168.92.49 TNS Ping Utility for Solaris: Version 10.2.0.2.0 - Production on 17-DEC-2010 21:06:51 Copyright (c) 1997, 2005, Oracle. All rights reserved. Used... (0 Replies)
Discussion started by: akhaliq22
0 Replies

7. AIX

How to monitor websphere services down?

if websphere services is down, any unix command or scripts can send alert? (1 Reply)
Discussion started by: rainbow_bean
1 Replies

8. Shell Programming and Scripting

Monitor the services by script

I developed for monitoring the network connections among the branch servers as I given below as script.But I don't know how to monitor the services through network script whether the services is running or not. eg : I want to check the postgres service for all the branch servers through network... (0 Replies)
Discussion started by: kannansoft1985
0 Replies

9. IP Networking

I would like to monitor network traffic for a computer on my network

My son does homework on a school laptop. I was thinking about setting up a gateway on my home network, so that I can monitor web traffic and know if he is doing his homework without standing over his shoulder. Ideally I would like to use the Raspberry Pi Model b that I already have. However, I... (15 Replies)
Discussion started by: gandolf989
15 Replies
in.talkd(1M)						  System Administration Commands					      in.talkd(1M)

NAME
in.talkd, talkd - server for talk program SYNOPSIS
in.talkd DESCRIPTION
talkd is a server used by the talk(1) program. It listens at the UDP port indicated in the ``talk'' service description; see services(4). The actual conversation takes place on a TCP connection that is established by negotiation between the two machines involved. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWrcmds | +-----------------------------+-----------------------------+ SEE ALSO
svcs(1), talk(1), inetadm(1M), inetd(1M), svcadm(1M), services(4), attributes(5), smf(5) NOTES
The protocol is architecture dependent. The in.talkd service is managed by the service management facility, smf(5), under the service identifier: svc:/network/talk Administrative actions on this service, such as enabling, disabling, or requesting restart, can be performed using svcadm(1M). Responsibil- ity for initiating and restarting this service is delegated to inetd(1M). Use inetadm(1M) to make configuration changes and to view config- uration information for this service. The service's status can be queried using the svcs(1) command. SunOS 5.10 31 Jul 2004 in.talkd(1M)
All times are GMT -4. The time now is 04:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy