Rack of Ethernet switches.

Visualizing Log Patterns with Color

Nginx and Apache Logs in Color

Web server logs reveal patterns of activity by web crawlers. Some are indexing crawlers operated by search engines, some are mysterious. Another pattern is systematic blind searches for vulnerable server-side executables or other configuration problems. The pattern you want to see is the interested user who follows some path through the hyperlinks on your site, taking time to read the pages.

Maybe we could use color to help spot these patterns?

Maybe...

First, let's look at the result, then the explanation comes later. Here are the most recent client requests, starting most recent first. Your request for this page won't appear there as it isn't complete by the time this page was automatically generated with PHP. But if you reload the page you should see your initial request near the top.

18.119.126.238 US, United States 09/Apr/2025:16:13:30 /open-source/stig-compliance.html
128.199.14.189 SG, Singapore 09/Apr/2025:16:13:29 /blog/2023/01/03-whats-up-with-my-social-media.html
128.199.14.189 SG, Singapore 09/Apr/2025:16:13:29 /
191.176.29.3 BR, Brazil 09/Apr/2025:16:13:25 /blog/2023/01/03-whats-up-with-my-social-media.html
191.176.29.3 BR, Brazil 09/Apr/2025:16:13:23 /
52.167.144.184 US, United States 09/Apr/2025:16:13:23 /travel/greece/crete/western-crete/
217.76.102.133 DE, Germany 09/Apr/2025:16:13:22 /blog/2023/01/03-whats-up-with-my-social-media.html
138.199.149.193 EU, Europe 09/Apr/2025:16:13:22 /blog/2023/01/03-whats-up-with-my-social-media.html
217.76.102.133 DE, Germany 09/Apr/2025:16:13:21 /
138.199.149.193 EU, Europe 09/Apr/2025:16:13:21 /
64.23.175.205 US, United States 09/Apr/2025:16:13:16 /blog/2023/01/03-whats-up-with-my-social-media.html
64.23.175.205 US, United States 09/Apr/2025:16:13:16 /
217.197.90.87 DE, Germany 09/Apr/2025:16:13:15 /blog/2023/01/03-whats-up-with-my-social-media.html
217.197.90.87 DE, Germany 09/Apr/2025:16:13:14 /
217.237.80.109 DE, Germany 09/Apr/2025:16:13:12 /travel/japan/kofun/empress-jingu.html?s=mb
37.60.240.63 US, United States 09/Apr/2025:16:13:10 /blog/2023/01/03-whats-up-with-my-social-media.html
37.60.240.63 US, United States 09/Apr/2025:16:13:09 /
89.117.77.241 LT, Lithuania 09/Apr/2025:16:13:06 /blog/2023/01/03-whats-up-with-my-social-media.html
89.117.77.241 LT, Lithuania 09/Apr/2025:16:13:06 /
90.230.19.20 SE, Sweden 09/Apr/2025:16:13:04 /blog/2023/01/03-whats-up-with-my-social-media.html
90.230.19.20 SE, Sweden 09/Apr/2025:16:13:02 /
152.70.243.53 US, United States 09/Apr/2025:16:12:55 /blog/2023/01/03-whats-up-with-my-social-media.html
152.70.243.53 US, United States 09/Apr/2025:16:12:54 /
182.161.73.7 SG, Singapore 09/Apr/2025:16:12:53 /open-source/performance-tuning/hardware.html
49.206.7.126 IN, India 09/Apr/2025:16:12:50 /open-source/bashrc/
3.234.232.38 US, United States 09/Apr/2025:16:12:50 /
65.109.161.189 US, United States 09/Apr/2025:16:12:50 /travel/japan/kofun/empress-jingu.html?s=mb
54.91.240.230 US, United States 09/Apr/2025:16:12:44 /blog/2023/01/03-whats-up-with-my-social-media.html
135.181.59.20 CA, Canada 09/Apr/2025:16:12:44 /blog/2023/01/03-whats-up-with-my-social-media.html
54.91.240.230 US, United States 09/Apr/2025:16:12:44 /
116.203.206.35 IN, India 09/Apr/2025:16:12:43 /blog/2023/01/03-whats-up-with-my-social-media.html
135.181.59.20 CA, Canada 09/Apr/2025:16:12:43 /
116.203.206.35 IN, India 09/Apr/2025:16:12:42 /
62.178.139.166 AT, Austria 09/Apr/2025:16:12:41 /blog/2023/01/03-whats-up-with-my-social-media.html
62.178.139.166 AT, Austria 09/Apr/2025:16:12:39 /
153.126.168.112 JP, Japan 09/Apr/2025:16:12:38 /blog/2023/01/03-whats-up-with-my-social-media.html
153.126.168.112 JP, Japan 09/Apr/2025:16:12:37 /
217.151.102.20 GB, United Kingdom 09/Apr/2025:16:12:34 /travel/japan/kofun/empress-jingu.html?s=mb
185.218.195.30 FI, Finland 09/Apr/2025:16:12:34 /travel/greece/milos/trypiti.html?s=mb
161.35.35.39 US, United States 09/Apr/2025:16:12:32 /blog/2023/01/03-whats-up-with-my-social-media.html
161.35.35.39 US, United States 09/Apr/2025:16:12:31 /
98.244.149.7 US, United States 09/Apr/2025:16:12:29 /travel/france/flaneur-10eme-arrondissement/?s=mb
49.206.7.126 IN, India 09/Apr/2025:16:12:24 /open-source/
185.207.107.5 DE, Germany 09/Apr/2025:16:12:23 /blog/2023/01/03-whats-up-with-my-social-media.html
185.207.107.5 DE, Germany 09/Apr/2025:16:12:21 /
18.214.43.70 US, United States 09/Apr/2025:16:12:18 /open-source/performance-tuning/hardware.html
65.109.134.148 US, United States 09/Apr/2025:16:12:16 /blog/2023/01/03-whats-up-with-my-social-media.html
49.12.99.205 IN, India 09/Apr/2025:16:12:16 /blog/2023/01/03-whats-up-with-my-social-media.html
46.22.99.207 IS, Iceland 09/Apr/2025:16:12:15 /travel/china/class-and-macau.html?s=mc
65.109.134.148 US, United States 09/Apr/2025:16:12:15 /
217.72.195.23 DE, Germany 09/Apr/2025:16:12:14 /blog/2023/01/03-whats-up-with-my-social-media.html
45.43.14.223 US, United States 09/Apr/2025:16:12:13 /blog/2023/01/03-whats-up-with-my-social-media.html
45.43.14.223 US, United States 09/Apr/2025:16:12:13 /
217.72.195.23 DE, Germany 09/Apr/2025:16:12:13 /
49.12.99.205 IN, India 09/Apr/2025:16:12:11 /
54.224.22.173 US, United States 09/Apr/2025:16:12:10 /cybersecurity/isc2-cissp/
46.22.99.207 IS, Iceland 09/Apr/2025:16:12:09 /travel/chile/valparaiso/uphill.html?s=mb
54.209.60.63 US, United States 09/Apr/2025:16:12:09 /cybersecurity/isc2-cissp/
159.69.72.33 DE, Germany 09/Apr/2025:16:12:03 /blog/2023/01/03-whats-up-with-my-social-media.html
5.199.139.171 DE, Germany 09/Apr/2025:16:12:02 /blog/2023/01/03-whats-up-with-my-social-media.html
159.69.72.33 DE, Germany 09/Apr/2025:16:12:02 /
5.199.139.171 DE, Germany 09/Apr/2025:16:12:01 /
81.187.213.114 GB, United Kingdom 09/Apr/2025:16:12:01 /travel/japan/kofun/empress-jingu.html?s=mb
49.12.233.21 IN, India 09/Apr/2025:16:12:01 /travel/japan/kofun/empress-jingu.html?s=mb
37.187.156.202 FR, France 09/Apr/2025:16:12:00 /travel/japan/kofun/empress-jingu.html?s=mb
5.75.170.255 IR, Iran, Islamic Republic of 09/Apr/2025:16:12:00 /blog/2023/01/03-whats-up-with-my-social-media.html
154.20.220.164 CA, Canada 09/Apr/2025:16:12:00 /travel/japan/kofun/empress-jingu.html?s=mb
195.201.127.16 DE, Germany 09/Apr/2025:16:12:00 /blog/2023/01/03-whats-up-with-my-social-media.html
5.75.170.255 IR, Iran, Islamic Republic of 09/Apr/2025:16:11:59 /
195.201.127.16 DE, Germany 09/Apr/2025:16:11:58 /
95.216.154.135 FI, Finland 09/Apr/2025:16:11:58 /travel/japan/kofun/empress-jingu.html?s=mb
83.223.95.237 DE, Germany 09/Apr/2025:16:11:58 /blog/2023/01/03-whats-up-with-my-social-media.html
95.216.94.149 FI, Finland 09/Apr/2025:16:11:57 /travel/japan/kofun/empress-jingu.html?s=mb
5.75.241.176 IR, Iran, Islamic Republic of 09/Apr/2025:16:11:57 /travel/japan/kofun/empress-jingu.html?s=mb
143.244.145.243 US, United States 09/Apr/2025:16:11:57 /travel/japan/kofun/empress-jingu.html?s=mb
49.206.7.126 IN, India 09/Apr/2025:16:11:57 /open-source/performance-tuning/hardware.html
83.223.95.237 DE, Germany 09/Apr/2025:16:11:56 /
5.135.138.119 FR, France 09/Apr/2025:16:11:56 /travel/japan/kofun/empress-jingu.html?s=mb
49.206.7.126 IN, India 09/Apr/2025:16:11:55 /open-source/performance-tuning/hardware.html
49.206.7.126 IN, India 09/Apr/2025:16:11:54 /open-source/performance-tuning/hardware.html
147.135.104.185 US, United States 09/Apr/2025:16:11:54 /travel/japan/kofun/empress-jingu.html?s=mb
144.6.228.171 AU, Australia 09/Apr/2025:16:11:54 /travel/japan/kofun/empress-jingu.html?s=mb
37.82.205.179 DE, Germany 09/Apr/2025:16:11:52 /travel/japan/kofun/empress-jingu.html?s=mb
188.34.183.167 IR, Iran, Islamic Republic of 09/Apr/2025:16:11:52 /blog/2023/01/03-whats-up-with-my-social-media.html
128.0.64.124 NL, Netherlands 09/Apr/2025:16:11:52 /travel/japan/kofun/empress-jingu.html?s=mb
77.75.73.26 CZ, Czech Republic 09/Apr/2025:16:11:52 /
51.68.203.250 FR, France 09/Apr/2025:16:11:51 /travel/china/class-and-macau.html?s=mc
188.34.183.167 IR, Iran, Islamic Republic of 09/Apr/2025:16:11:50 /
104.152.210.87 CA, Canada 09/Apr/2025:16:11:50 /travel/japan/kofun/empress-jingu.html?s=mb
71.191.71.248 US, United States 09/Apr/2025:16:11:50 /travel/japan/kofun/empress-jingu.html?s=mb
67.82.24.131 US, United States 09/Apr/2025:16:11:49 /blog/2023/01/03-whats-up-with-my-social-media.html
5.78.104.95 IR, Iran, Islamic Republic of 09/Apr/2025:16:11:48 /travel/japan/kofun/empress-jingu.html?s=mb
178.21.119.95 NL, Netherlands 09/Apr/2025:16:11:46 /travel/japan/kofun/empress-jingu.html?s=mb
67.82.24.131 US, United States 09/Apr/2025:16:11:46 /
57.128.95.173 BE, Belgium 09/Apr/2025:16:11:46 /travel/japan/kofun/empress-jingu.html?s=mb
137.184.30.4 US, United States 09/Apr/2025:16:11:46 /travel/japan/kofun/empress-jingu.html?s=mb
5.75.254.114 IR, Iran, Islamic Republic of 09/Apr/2025:16:11:46 /travel/japan/kofun/empress-jingu.html?s=mb
57.128.118.175 BE, Belgium 09/Apr/2025:16:11:46 /travel/japan/kofun/empress-jingu.html?s=mb
73.164.13.49 US, United States 09/Apr/2025:16:11:44 /travel/japan/kofun/empress-jingu.html?s=mb
5.78.41.244 IR, Iran, Islamic Republic of 09/Apr/2025:16:11:44 /travel/japan/kofun/empress-jingu.html?s=mb
23.81.164.200 US, United States 09/Apr/2025:16:11:43 /travel/japan/kofun/empress-jingu.html?s=mb
91.107.207.76 IR, Iran, Islamic Republic of 09/Apr/2025:16:11:43 /travel/japan/kofun/empress-jingu.html?s=mb
24.165.181.223 US, United States 09/Apr/2025:16:11:43 /travel/japan/kofun/empress-jingu.html?s=mb
168.119.182.123 US, United States 09/Apr/2025:16:11:42 /travel/japan/kofun/empress-jingu.html?s=mb
51.68.203.250 FR, France 09/Apr/2025:16:11:42 /
85.184.249.48 DE, Germany 09/Apr/2025:16:11:42 /travel/japan/kofun/empress-jingu.html?s=mb
139.60.163.204 US, United States 09/Apr/2025:16:11:39 /travel/japan/kofun/empress-jingu.html?s=mb
49.206.7.126 IN, India 09/Apr/2025:16:11:38 /open-source/performance-tuning/nfs.html
167.71.88.183 US, United States 09/Apr/2025:16:11:38 /travel/japan/kofun/empress-jingu.html?s=mb
104.248.88.18 US, United States 09/Apr/2025:16:11:37 /blog/2023/01/03-whats-up-with-my-social-media.html
135.125.104.28 US, United States 09/Apr/2025:16:11:37 /travel/japan/kofun/empress-jingu.html?s=mb
103.108.231.122 AU, Australia 09/Apr/2025:16:11:37 /travel/japan/kofun/empress-jingu.html?s=mb
108.61.171.158 DE, Germany 09/Apr/2025:16:11:37 /travel/japan/kofun/empress-jingu.html?s=mb
104.248.88.18 US, United States 09/Apr/2025:16:11:36 /
82.13.81.120 GB, United Kingdom 09/Apr/2025:16:11:36 /travel/japan/kofun/empress-jingu.html?s=mb
157.180.35.13 SE, Sweden 09/Apr/2025:16:11:35 /travel/japan/kofun/empress-jingu.html?s=mb
176.139.184.22 FR, France 09/Apr/2025:16:11:35 /travel/japan/kofun/empress-jingu.html?s=mb
162.55.131.56 US, United States 09/Apr/2025:16:11:35 /blog/2023/01/03-whats-up-with-my-social-media.html
88.99.93.158 DE, Germany 09/Apr/2025:16:11:35 /travel/japan/kofun/empress-jingu.html?s=mb
168.119.151.15 US, United States 09/Apr/2025:16:11:34 /travel/japan/kofun/empress-jingu.html?s=mb
152.53.2.106 US, United States 09/Apr/2025:16:11:34 /blog/2023/01/03-whats-up-with-my-social-media.html
162.55.131.56 US, United States 09/Apr/2025:16:11:33 /
5.78.106.223 IR, Iran, Islamic Republic of 09/Apr/2025:16:11:33 /travel/japan/kofun/empress-jingu.html?s=mb
208.113.130.160 US, United States 09/Apr/2025:16:11:33 /travel/japan/kofun/empress-jingu.html?s=mb
152.53.2.106 US, United States 09/Apr/2025:16:11:33 /
62.171.171.214 GB, United Kingdom 09/Apr/2025:16:11:32 /travel/japan/kofun/empress-jingu.html?s=mb
3.143.18.255 US, United States 09/Apr/2025:16:11:32 /open-source/1901/
3.143.18.255 US, United States 09/Apr/2025:16:11:32 /open-source/
71.19.144.177 US, United States 09/Apr/2025:16:11:32 /travel/japan/kofun/empress-jingu.html?s=mb
213.230.211.81 GB, United Kingdom 09/Apr/2025:16:11:31 /travel/japan/kofun/empress-jingu.html?s=mb
5.161.78.242 IR, Iran, Islamic Republic of 09/Apr/2025:16:11:31 /travel/japan/kofun/empress-jingu.html?s=mb
62.214.50.186 DE, Germany 09/Apr/2025:16:11:31 /blog/2023/01/03-whats-up-with-my-social-media.html
62.214.50.186 DE, Germany 09/Apr/2025:16:11:29 /
92.116.231.59 DE, Germany 09/Apr/2025:16:11:28 /travel/japan/kofun/empress-jingu.html?s=mb
175.30.48.163 CN, China 09/Apr/2025:16:11:28 /
173.249.0.10 DE, Germany 09/Apr/2025:16:11:28 /travel/japan/kofun/empress-jingu.html?s=mb
57.128.95.173 BE, Belgium 09/Apr/2025:16:11:28 /travel/japan/kofun/empress-jingu.html?s=mb
141.95.205.41 GB, United Kingdom 09/Apr/2025:16:11:27 /travel/japan/kofun/empress-jingu.html?s=mb
116.203.225.209 IN, India 09/Apr/2025:16:11:27 /travel/japan/kofun/empress-jingu.html?s=mb
101.100.184.88 SG, Singapore 09/Apr/2025:16:11:24 /travel/japan/kofun/empress-jingu.html?s=mb
97.107.130.79 US, United States 09/Apr/2025:16:11:23 /travel/japan/kofun/empress-jingu.html?s=mb
135.125.104.28 US, United States 09/Apr/2025:16:11:23 /blog/2023/01/03-whats-up-with-my-social-media.html
135.125.104.28 US, United States 09/Apr/2025:16:11:22 /
99.182.35.244 US, United States 09/Apr/2025:16:11:21 /travel/japan/kofun/empress-jingu.html?s=mb
71.115.240.201 US, United States 09/Apr/2025:16:11:21 /travel/japan/kofun/empress-jingu.html?s=mb
141.95.205.35 GB, United Kingdom 09/Apr/2025:16:11:21 /blog/2023/01/03-whats-up-with-my-social-media.html
54.38.85.38 FR, France 09/Apr/2025:16:11:20 /travel/chile/isla-navarino/ferry/
162.19.29.212 US, United States 09/Apr/2025:16:11:20 /travel/japan/kofun/empress-jingu.html?s=mb
141.95.205.35 GB, United Kingdom 09/Apr/2025:16:11:19 /
116.203.31.160 IN, India 09/Apr/2025:16:11:19 /travel/japan/kofun/empress-jingu.html?s=mb
134.195.91.171 US, United States 09/Apr/2025:16:11:18 /travel/japan/kofun/empress-jingu.html?s=mb
54.38.85.38 FR, France 09/Apr/2025:16:11:18 /robots.txt
150.230.183.187 US, United States 09/Apr/2025:16:11:17 /travel/japan/kofun/empress-jingu.html?s=mb
37.27.224.163 IR, Iran, Islamic Republic of 09/Apr/2025:16:11:16 /travel/japan/kofun/empress-jingu.html?s=mb
168.91.237.183 US, United States 09/Apr/2025:16:11:16 /travel/japan/kofun/empress-jingu.html?s=mb
93.181.37.120 DE, Germany 09/Apr/2025:16:11:14 /travel/japan/kofun/empress-jingu.html?s=mb
45.32.254.54 JP, Japan 09/Apr/2025:16:11:14 /travel/japan/kofun/empress-jingu.html?s=mb
107.175.179.125 US, United States 09/Apr/2025:16:11:13 /travel/japan/kofun/empress-jingu.html?s=mb
91.199.227.105 NL, Netherlands 09/Apr/2025:16:11:12 /travel/japan/kofun/empress-jingu.html?s=mb
51.68.203.250 FR, France 09/Apr/2025:16:11:12 /travel/japan/kofun/empress-jingu.html?s=mb
51.68.205.236 FR, France 09/Apr/2025:16:11:11 /travel/japan/kofun/empress-jingu.html?s=mb
92.205.17.231 DE, Germany 09/Apr/2025:16:11:10 /travel/japan/kofun/empress-jingu.html?s=mb
5.161.180.139 IR, Iran, Islamic Republic of 09/Apr/2025:16:11:09 /travel/japan/kofun/empress-jingu.html?s=mb
69.40.112.78 US, United States 09/Apr/2025:16:11:09 /travel/japan/kofun/empress-jingu.html?s=mb
70.105.243.106 US, United States 09/Apr/2025:16:11:09 /blog/2023/01/03-whats-up-with-my-social-media.html
207.89.120.44 DE, Germany 09/Apr/2025:16:11:09 /travel/japan/kofun/empress-jingu.html?s=mb
84.119.223.23 DE, Germany 09/Apr/2025:16:11:08 /travel/japan/kofun/empress-jingu.html?s=mb
172.213.12.117 GB, United Kingdom 09/Apr/2025:16:11:08 /
172.213.12.127 GB, United Kingdom 09/Apr/2025:16:11:08 /travel/morocco/tangier/arrival.html
70.105.243.106 US, United States 09/Apr/2025:16:11:07 /
217.155.114.82 GB, United Kingdom 09/Apr/2025:16:11:07 /travel/japan/kofun/empress-jingu.html?s=mb
51.155.192.244 GB, United Kingdom 09/Apr/2025:16:11:07 /travel/japan/kofun/empress-jingu.html?s=mb
66.148.120.148 US, United States 09/Apr/2025:16:11:06 /travel/japan/kofun/empress-jingu.html?s=mb
161.35.8.200 US, United States 09/Apr/2025:16:11:04 /blog/2023/01/03-whats-up-with-my-social-media.html
161.35.8.200 US, United States 09/Apr/2025:16:11:04 /
185.195.232.137 SE, Sweden 09/Apr/2025:16:11:02 /travel/japan/kofun/empress-jingu.html?s=mb
94.130.165.224 DE, Germany 09/Apr/2025:16:11:01 /blog/2023/01/03-whats-up-with-my-social-media.html
94.130.165.224 DE, Germany 09/Apr/2025:16:11:00 /
129.80.112.139 US, United States 09/Apr/2025:16:11:00 /travel/japan/kofun/empress-jingu.html?s=mb
62.163.215.120 NL, Netherlands 09/Apr/2025:16:10:59 /travel/japan/kofun/empress-jingu.html?s=mb
142.132.189.194 CA, Canada 09/Apr/2025:16:10:56 /blog/2023/01/03-whats-up-with-my-social-media.html
93.190.126.34 TR, Turkey 09/Apr/2025:16:10:55 /blog/2023/01/03-whats-up-with-my-social-media.html
142.132.189.194 CA, Canada 09/Apr/2025:16:10:55 /
93.190.126.34 TR, Turkey 09/Apr/2025:16:10:54 /
185.191.171.3 MD, Moldova, Republic of 09/Apr/2025:16:10:54 /turkish/verbs.html
136.62.158.195 US, United States 09/Apr/2025:16:10:48 /travel/chile/valparaiso/uphill.html?s=mb
57.128.95.175 BE, Belgium 09/Apr/2025:16:10:42 /blog/2023/01/03-whats-up-with-my-social-media.html

Here's what's going on.

Each line above is a request from a client, extracted from Nginx's /var/www/logs/httpd-access.log file. The client IP address, timestamp, and requested path were selected with awk and the client IP address converted to a country if possible with geoiplookup.

Geolocate IP

You can use a service such as Abstract's IP geolocation to check if the conversion was successful, or if the client IP address is the exit portal of a VPN.

The first 3 octets or first 24 bits of the IP address are used to specify the hue, with chroma at 75% and intensity at 100%. The resulting red, green, and blue values are scaled to the range of 0-255 and printed as two-character hexadecimal in an HTML style string.

Low-numbered /8 networks appear as red, 20.0.0.0/8 through 40.0.0.0/8 are orange shifting to yellow, 50.0.0.0/8 through 110.0.0.0/8 are shades of green, the /16 networks 130.0.0.0/16 through about 180.0.0.0/16 are shades of blue, then it's shades of purple into magenta for the /24 networks 192.0.0.0/24 and up through 223.255.255.0/24.

The HTML file on the server has a line where PHP uses passthru() to call the following shell script:

#!/bin/sh

# Initial pipeline:
# tail		Just the last 200 (or slightly less after the grep)
# grep		... just the requests out of that
# cat | sort	... put into reverse order
# sed		... remove the quotes and square brackets
# awk		... print the IP address twice, timestamp, and requested path
# sed		... remove the first 3 dots to split first version of IP
#			address into octets, and remove any characters that
#			could cause trouble when inserted into this page
# I need to use the client IP address, field #5 at that point, to call
# geoiplookup.  So, send the initial pipeline into a while loop that
# assigns variables, sets a new variable, and then echoes the resulting
# collection into awk.
tail -200 /var/www/logs/access_log |
	grep 'GET.*200' |
	cat -n | sort -nr |
	sed -e 's/"/ /g' -e 's/\[//g' -e 's/\]//g' |
	awk '{print $2, $2, $5, $8}' |
	sed -e 's/\./ /' -e 's/\./ /' -e 's/\./ /' -e 's/[<>]//g' |
	while read IP1 IP2 IP3 IP4 CLIENTIP TIMESTAMP URL
	do
		COUNTRY=$( geoiplookup $CLIENTIP |
				sed 's/.*Edition: //' |
				sed 's/IP Address not found/Unknown/' )
		echo $IP1 $IP2 $IP3 $IP4 $CLIENTIP $COUNTRY $TIMESTAMP $URL |
		awk '{
			ip1 = $1;
			ip2 = $2;
			ip3 = $3;
			chroma = 0.75;
			hue = 6*(ip1*255*255 + ip2*255 + ip3)/(255*255*255);
			if (hue%2 > 1) {
				x = chroma*(1.0 - (hue%2 - 1));
			} else {
				x = chroma*(1.0 - (1 - hue%2));
			}
			if (hue < 1.0) {
				r = chroma;
				g = x;
				b = 0;
			} else if (hue < 2.0) {
				r = x;
				g = chroma;
				b = 0;
			} else if (hue < 3.0) {
				r = 0;
				g = chroma;
				b = x;
			} else if (hue < 4.0) {
				r = 0;
				g = x;
				b = chroma;
			} else if (hue < 5.0) {
				r = x;
				g = 0;
				b = chroma;
			} else {
				r = chroma;
				g = 0;
				b = x;
			}
			r = (r + 0.25)*255;
			g = (g + 0.25)*255;
			b = (b + 0.25)*255;

			printf("<div class=\"col-12 textleft\" ");
			printf("style=\"color:#000; background:#%02x%02x%02x;\"> ", r, g, b);
			for (i = 5; i <= NF; i++) {
				printf("%s ", $i);
			}
			printf("</div>\n");
		}'
	done 

Other Pages