Using finger service the wrong way


If you’re doing this, you’re doing it wrong...

2016-05-31 10:19:45.493314 Client 92.x.x.192 hamburg, germany/hamburg/hamburg
2016-05-31 10:19:48.443380 Client 74.x.x.189 greensboro, united_states/north_carolina/greensboro
2016-05-31 10:19:56.733260 Client 50.x.x.50 beaverton, united_states/oregon/beaverton
2016-05-31 10:19:56.745653 Client 50.x.x.50 beaverton, united_states/oregon/beaverton
2016-05-31 10:19:56.759656 Client 50.x.x.50 beaverton, united_states/oregon/beaverton
2016-05-31 10:19:56.819283 Client 50.x.x.50 beaverton, united_states/oregon/beaverton
2016-05-31 10:20:16.287744 Client 5.x.x.13 kaiserslautern, germany/rhineland-palatinate/kaiserslautern
2016-05-31 10:20:35.182942 Client 85.x.x.140 katowice, poland/silesia/katowice
2016-05-31 10:20:47.029550 Client 193.x.x.226 oslo, norway/oslo/oslo/oslo

Lots of people use the finger service in an automated way. That’s quite alright, it’s what it’s there for. As an example: used in an automated way at the Computer Science department at the KIT Karlsruhe

But if you’re asking for the same data five times a second (until you get blocked by my firewall for a minute), you have to check your code. The data is at best changing every ~30 minutes.

A likely scenario is putting it in screen/tmux status line. If you do that, you need to change how often your terminal multiplexer is updating the status line. A better way is to have a cron script fetching the data, and storing it in i.e. /tmp/weather every 30-60 minutes, and then have your status line read from that.

Another scenario could be people running it in watch, which by default updates every two seconds. Also wrong. Please use -n 600 more.

If you fetch the data, and grep out what you need, then fetch the data once, and grep all you like. Don’t fetch for each grep. An example of this can be seen in the client, which fetches the data, sed a lot and present it using unicode weather symbols and colors.

Feel free to contact me if you need scripts/examples or have questions.

Also, don’t feel ashamed, beaverton, you’re not alone in hammering me. I just don’t have any way to contact users. I still love you all. =)