471,092 Members | 1,357 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,092 software developers and data experts.

PyHeartBeat Client in PERL?

Hello Everyone.

Whil e reading the Python Cookbook as a means of learning Python, I
came across the script by Nicola Larosa. Not knowing anything about PERL, I
was wondering if there were a translation in PERL so I could have my Netware
servers send heartbeats to the heartbeat server? Thanks!


Title: PyHeartbeat - detecting inactive computers
Submitter: Nicola Larosa

# Filename: HeartbeatClient.py

"""Heartbeat client, sends out an UDP packet periodically"""

import socket, time


print ('Sending heartbeat to IP %s , port %d\n'
'press Ctrl-C to stop\n') % (SERVER_IP, SERVER_PORT)
while True:
hbSocket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
hbSocket.sendto('PyHB', (SERVER_IP, SERVER_PORT))
if __debug__: print 'Time: %s' % time.ctime()

Jul 18 '05 #1
0 881

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Mike van Lammeren | last post: by
3 posts views Thread by phal | last post: by
reply views Thread by crawfordr | last post: by
31 posts views Thread by happyse27 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.