Linux commands for network checking in Alfresco

Last day we wrote a little bit about basic commands to check disks in an Alfresco installation [4]. This post is inspired in some basic network recipes and tests for an Alfresco installation, usually in a three tier configuration composed by three boxes. For example:
  • A - Apache Frontend
  • B - Alfresco Server
  • C - Database Server 
First checking we do is to try simple pings between the boxes via ping -c command. A suitable network perfomance (for Alfresco) is getting roundtrips (rtt) smaller than 1 ms and a standard deviation less than 0.1 ms between Alfresco and Database Server. This test in fact, is part of Alfresco Environment Validation Tool (EVT) and it is part of Alfresco documentation.
 
From Computer B:
 
$ ping -c database-server
 
We usually need first to check some ports, for example via nc command [1] & [2], a very useful tool for checking ports, telnet usage, transfer files or partitions, and so on. For example from Apache Web server we may want to check if there are available 8009 and 8080 ports in Alfresco server for reverse proxy. It is clear that all ports mentioned must be available via local iptables (in the following example 8009 and 8080 in Alfresco Server).
 
From Computer A:
 
$ nc -v alfresco-server 8009
$ nc -v alfresco-server 8080
 
NOTE: You must check these ports in an Alfresco installation [3]
 
These ports are typical in any tomcat server. From your nagios / icinga box, you may want to monitor JMX in Alfresco. Then you need to enable JMX in Alfresco Server and configure JMX monitor port (monitor.rmi.service.port=50508) defined in alfresco-global.properties
 
And from Nagios / Icinga Box:
 
$ nc -v alfresco-server 50508
 
A network perfomance can be achieved via a combination of nc and dd command. Last day, we used dd to test how fast our disks write. 
 
For example:
 
In Computer C (database server), we can open a socket in 12345 (this port must be opened via local iptables).
 
$ nc -vvlnp 12345 > /dev/null
 
In Computer B (application server):
 
$ dd if=/dev/zero bs=1M count=1K | nc -vvn database-server 12345

Connection to database-server 12345 port [tcp/*] succeeded!
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 9.11995 s, 118 MB/s
 
Another possibility, mentioned by Gustavo in this blog for doing this [5] and [6], is via iperf (we need iperf installed in both boxes) which uses 5001 as default port 
 
Then on Computer C (as server - needs 5001 port):
 
$ iperf -s -p 5001  
 
And on Computer B:
 
$ iperf -c <address of Computer C>

------------------------------------------------------------
Client connecting to database, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  3] local alfresco port 37248 connected with database port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  1.04 GBytes    893 Mbits/sec
 
Links:
00

More Blog Entries

thumbnail
thumbnail

0 Comments