Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Edit /etc/crontab and save. then reboot to make the new version take effect (alternatively use kill -HUP <PID> (e.g. kill -HUP 3039) to force an update of the crontab process, where you can find the PID from the ps ux command - see above). There is an example of a crontab:

Logs

The log is kept in /var/log/messages. We believe this is "rotated" (compressed, saved and deleted) automatically by syslog using /etc/logrotate.conf and /etc/syslog.conf, so memory is not eventually exhausted.

...

One applies the patches using apt-get update. However this can take over 45KBytes of memory. We have not decided if or how to automate the patch process.

Testing

Look at the last date the current file in /usr/local/share/pinger/data/ was updated and compare this to date, the times should be withinn within 30 minutes:

Code Block
voyage:~# ls -l /usr/local/share/pinger/data/
total 3404
-rw-r--r-- 1 root staff 3480630 May 18 17:31 ping-2009-05.txt
voyage:~# date
Tue May 19 01:15:38 GMT 2009

If not see whether pinger2.pl runs OKif pinger2 is executing properly:

Code Block
voyage:~# cd /usr/local/share/pinger
voyage:/usr/local/share/pinger# perl /usr/local/share/pinger/pinger2.pl
getIPV4: voyage
BeaconList is still up to date.
Going to sleep for 1329.1526382662106 minutes.
035192998008 minutes.
pingAllHosts(): Starting to ping all hosts.
pingHost(): Enter.
queryDNSCache: www.univ-batna.dz
getIPV4: www.univ-batna.dz
pingHost(): www.univ-batna.dz.
doPing(): Expanded pingCmd resolved to '/bin/ping -n -w 21 -c 1 -i 1 -s 56 193.194.69.34'
pingHost(): Enter.
queryDNSCache: www.ucan.edu
getIPV4: www.ucan.edu
pingHost(): www.ucan.edu.
...

Look at the date stamps on pingerCronStat.* and look at the contents if there is anything there:

Code Block

voyage:~# ls -l /usr/local/share/pinger/pingerCronStat.*
-rw-r--r-- 1 root staff     0 May 18 10:30 /usr/local/share/pinger/pingerCronStat.stderr
-rw-r--r-- 1 root staff 52934 May 18 11:02 /usr/local/share/pinger/pingerCronStat.stdout

Check the cronjob is running

Code Block

voyage:~# ps ux | grep cron
root      3039  0.0  0.3   2192   772 ?        Ss   May18   0:00 /usr/sbin/cron
root      4283  0.0  0.1   1640   508 pts/0    R+   01:43   0:00 grep cron

If pinger2 is running (e.g. soon after the 30 mins interval in which it is scheduled) you might see something like:

Code Block

voyage:~# ps ux | grep pinger2
root      5613  0.0  0.4   2400  1060 ?        Ss   03:00   0:00 /bin/sh -c cd /usr/local/share/pinger; \
perl /usr/local/share/pinger/pinger2.pl > /usr/local/share/pinger/pingerCronStat.stdout 2> \
/usr/local/share/pinger/pingerCronStat.stderr
root      5614  0.2  2.5   9048  6604 ?        S    03:00   0:02 perl /usr/local/share/pinger/pinger2.pl
root      6091  0.0  2.1   9048  5408 ?        S    03:16   0:00 perl /usr/local/share/pinger/pinger2.pl
root      6105  0.0  2.1   9048  5408 ?        S    03:16   0:00 perl /usr/local/share/pinger/pinger2.pl
root      6157  0.0  0.1   1640   512 pts/1    R+   03:17   0:00 grep pinger2

We verified that the host recovered after a power cycle.

  • It pinged so the host was up,
  • http://140.105.28.27/cgi-bin/ping_data.pl responds so Apache works.
  • Submitting the request fetched appropriate data (i.e the latest was current within 30 mins, note the time-stamps are in Unix epoch time and are GMT.

Configuration

Logging onto the Host

Give yourself an IP in the same network as the ePinger machines. For example, you can give yourself 140.105.28.30 with netmask 255.255.255.128. You can then connect with any network cable to the Alix board and follow the instructions you already have. Of course, keep in mind that if you change the IP of the eth port on the right (as seen from the back) then you need to be on the same network to communicate with it.

Ethernet

Here is how to setup the network interface on the ALIX board:

  • login as root
  • remountrw
  • cd /etc/network/
  • vi interfaces
  • just copy what is already there for eth0 and change the IPs.
  • /etc/init.d/networking restart (this will restart the networking
    services)
  • ifconfig (to check if everything is OK).

That should be it.

Keep in mind that eth0 is the plug on the right (there is sticker too), while eth1 is the one on the left.

After reboot, it takes some time before you are able to ssh. Don't panic (I did).

When you setup eth1, you should disable eth0. In this way it answers to ssh much faster. And at then end, they don't use both eth ports. On the other side, it's a good idea to have both for local troubleshooting.

Apache Logs

The Apache log rotation should be set up. This section just explains it a bit more:

1) check apache logs files:

ls /etc/log/apache/*.log

2) change directory:

cd /etc/logrotate.d

3) edit file: "apache" and change first line: /etc/log/apache/*.log
(default is /var/log/apache/*.log)

4) run: logrotate -f /etc/logrotate.conf

5) check that logs have rotated:

ls /etc/log/apache/.