---
title: 'VMware FAH Appliance: Making Of F@H-Stats'
url: 'https://patrik.kernstock.net/blog/vmware-fah-appliance-making-of-fh-stats'
markdown: 'https://patrik.kernstock.net/blog/vmware-fah-appliance-making-of-fh-stats.md'
date: '2020-03-22'
description: "You might have seen my previous blog post about the VMware Appliance for Folding@Home. This article is about how the local console was made underneath – and actually how simple it is. Usually when powering on a Linux-based operating system, you just get the usual login console after boot. I thought that it would be handy to see what or if something is ongoing without actually logging in – so in other words: Seeing how busy the virtual machine is, and what the Folding@Home software is doing. So I went ahead figuring out a simple, fast and easy way showing both. Ending up with the idea: Using a terminal multiplexer, and showing the classic top and tail -f /var/lib/fahclient/log.txt. That’s how it looks like (when Enable F@H Stats in VM Console was enabled during deployment): Local Console / F@H Stats This is how it works… How it works 1. First of all, make sure to install tmux on your machine first. On PhotonOS that’s done by running tdnf install -y tmux. (see tdnf docs) 2. Prepare a small script to start tmux. (nano /root/tmux.sh, or vi) #!/bin/sh tmux new-session -d 'top' tmux split-window -p 10 -v 'tail -f /var/lib/fahclient/log.txt' tmux -2 attach-session -d This starts a new tmux session with top, then splitting the window horizontally with 10% height where the tail command is run. Then we basically attach to the newly created"
taxonomy:
  category:
    - Linux
    - 'Shell & System'
    - VMware
  tag:
    - Fling
    - QuickTip
    - tmux
---

# [VMware FAH Appliance: Making Of F@H-Stats](https://patrik.kernstock.net/blog/vmware-fah-appliance-making-of-fh-stats)

   March 22, 2020    2 min 

   [Linux](https://patrik.kernstock.net/category:Linux) [Shell & System](https://patrik.kernstock.net/category:Shell%20%26%20System)   [VMware](https://patrik.kernstock.net/category:VMware)    [Fling](https://patrik.kernstock.net/tag:Fling) [QuickTip](https://patrik.kernstock.net/tag:QuickTip) [tmux](https://patrik.kernstock.net/tag:tmux)  

 Note

This article is more than 6 year(s) old – information may be outdated.

 ![VMware FAH Appliance: Making Of F@H-Stats](https://patrik.kernstock.net/images/2/0/2/0/-/2020-03-1908-18-43-mcqhag14-5d7d8a91.png?g-1145e14b "VMware FAH Appliance: Making Of F@H-Stats") 

You might have seen my previous blog post about the [VMware Appliance for Folding@Home](https://patrik.kernstock.net/blog/vmware-appliance-for-folding-at-home). This article is about how the local console was made underneath – and actually how simple it is.

Usually when powering on a Linux-based operating system, you just get the usual login console after boot. I thought that it would be handy to see what or if something is ongoing without actually logging in – so in other words: Seeing how busy the virtual machine is, and what the Folding@Home software is doing.

So I went ahead figuring out a simple, fast and easy way showing both. Ending up with the idea: Using a terminal multiplexer, and showing the classic *top* and *tail -f /var/lib/fahclient/log.txt*.

That’s how it looks like (when *Enable F@H Stats in VM Console* was enabled during deployment):

[![](https://patrik.kernstock.net/user/pages/01.blog/2020-03-22-vmware-fah-appliance-making-of-fh-stats/2020-03-19_08-18-43-McqHAg14.png?g-1145e14b)](https://patrik.kernstock.net/user/pages/01.blog/2020-03-22-vmware-fah-appliance-making-of-fh-stats/2020-03-19_08-18-43-McqHAg14.png?g-1145e14b)
Local Console / F@H Stats

This is how it works…

## How it works

**1. First of all, make sure to install *tmux* on your machine first.**
On PhotonOS that’s done by running *tdnf install -y tmux*. (see [tdnf docs](https://vmware.github.io/photon/assets/files/html/3.0/photon_admin/tdnf.html))

**2. Prepare a small script to start tmux.** (*nano /root/tmux.sh,* or *vi*)

```
#!/bin/sh
tmux new-session -d 'top'
tmux split-window -p 10 -v 'tail -f /var/lib/fahclient/log.txt'
tmux -2 attach-session -d
```

This starts a new *tmux* session with *top*, then splitting the window horizontally with 10% height where the *tail* command is run. Then we basically attach to the newly created tmux session… Voila, we have our simple overview!

**3. Make the above script executable** by using:

```
chmod +x /root/tmux.sh
```

**4. Configure the script being called upon boot and shown instead of login console**
Note: This steps are designed for Linux distributions taking use of systemd.

```
$ mkdir -p /etc/systemd/system/getty@tty1.service.d/
$ cat > /etc/systemd/system/getty@tty1.service.d/override.conf <<EOF
[Service]
ExecStart=
ExecStart=-/root/tmux.sh
StandardInput=tty
StandardOutput=tty
EOF
```

**5. Apply changes**
Here you can either reboot to test, or reload systemd and restart getty on a **different** terminal:

```
$ systemctl daemon-reload
$ systemctl restart getty@tty1.service
```

**Resources which helped a lot:**

- [www.unixtutorial.org/projects-start-tmux-instead-of-login-prompt-on-tty1](https://www.unixtutorial.org/projects-start-tmux-instead-of-login-prompt-on-tty1)
- [stackoverflow.com/questions/5609192/how-to-set-up-tmux-so-that-it-starts-up-with-specified-windows-opened](https://stackoverflow.com/questions/5609192/how-to-set-up-tmux-so-that-it-starts-up-with-specified-windows-opened)

##     Comments    

 Sort by: 

Loading comments...

---

## Navigation

- Parent: [Blog](https://patrik.kernstock.net/index.md)
- Previous: [Horizon Agent: Installation fails at VM_BlastUDPReservePorts](https://patrik.kernstock.net/blog/horizon-agent-installation-fails-at-vm_blastudpreserveports.md)
- Next: [VMware Appliance for Folding@Home](https://patrik.kernstock.net/blog/vmware-appliance-for-folding-at-home.md)
