# CLI dashboard for SNOs

**URL:** <https://forum.storj.io/t/cli-dashboard-for-snos/21630>\
**Category:** Node Operators\
**Tags:** macos, linux, useful-tools, windows, local-dashboard\
**Created:** [March 1, 2023, 9:14am UTC](https://forum.storj.io/t/cli-dashboard-for-snos/21630 "2023-03-01T09:14:03Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![s-t-o-r-j-user](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/s-t-o-r-j-user/32/7816_2.png) [@s-t-o-r-j-user](https://forum.storj.io/u/s-t-o-r-j-user)\
**Post date:** [September 23, 2023, 9:03pm UTC](https://forum.storj.io/t/cli-dashboard-for-snos/21630/22 "2023-09-23T21:03:53Z")

</div>

![cli-dash-sno2_c](https://storj-s3.bcdn.literatehosting.net/original/2X/4/426a91609c34ede4874233ca5069a2b192605a06.png)

Previous one was with Gnome Terminal and Gruvbox Dark this one with kitty and if I remember correctly Tokyo Night. To be honest and with full respect I realized that I am finding it too flashy, especially when running a series of reading for a few nodes in a row, each node with a different color. The next step I am going to take is to remove all the whites and blend it with the main color. I will leave only the greens, yellows and reds.[This may not happen immediately but this is my intention for the future]. The reason is that I found that after a few refreshes I am only focusing on a few fields and checking if everything is just running. I think it is subjective but for me the most important values are: `Name`, `Up to date version indicator`, `Quick status`, `Storj token exchange rate`, todays `egress` and `ingress` and `online` and `suspension` stats. Please do not get me wrong, I believe the other fields are very important, however, they are used sporadically.

But hey, I am wondering if you know:

How to transform date output of `<$ver[0].published_at>` into `<-format "dd-MMM-yyyy HH:mm:ss>`?

How to increase GitHub limit? This one from `60`? Is there any `piece of code` and precise GitHub `token creation steps` you may provide?

And how to make a variable from `<127.0.0.1:14002>` so

`$satData = Invoke-WebRequest 'http://127.0.0.1:14002/api/sno/satellites' | ConvertFrom-Json`

can be changed into something like

`$satData = Invoke-WebRequest 'http:// **$ipport** /api/sno/satellites' | ConvertFrom-Json`.

This way or another thanks again.

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [September 24, 2023, 2:55am UTC](https://forum.storj.io/t/cli-dashboard-for-snos/21630/23 "2023-09-24T02:55:40Z")

</div>

> [@s-t-o-r-j-user](#):
>
> How to transform date output of `<$ver[0].published_at>` into `<-format "dd-MMM-yyyy HH:mm:ss>`?

> <https://stackoverflow.com/questions/38717490/convert-a-string-to-datetime-in-powershell/38717584#38717584>

> <https://stackoverflow.com/questions/2249619/how-to-format-a-datetime-in-powershell/2249639#2249639>

> [@s-t-o-r-j-user](#):
>
> And how to make a variable from `<127.0.0.1:14002>` so
> 
> `$satData = Invoke-WebRequest 'http://127.0.0.1:14002/api/sno/satellites' | ConvertFrom-Json`
> 
> can be changed into something like
> 
> `$satData = Invoke-WebRequest 'http:// **$ipport** /api/sno/satellites' | ConvertFrom-Json`.

```auto
$nodeAPI = 'http://192.168.10.12:14324/api/sno'
$satData = Invoke-WebRequest ($nodeAPI + '/satellites') -UseBasicParsing | ConvertFrom-Json

```

---

<div class="post-metadata">

**Author:** ![nerdatwork](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/nerdatwork/32/1135_2.png) [@nerdatwork](https://forum.storj.io/u/nerdatwork)\
**Post date:** [September 24, 2023, 5:46am UTC](https://forum.storj.io/t/cli-dashboard-for-snos/21630/24 "2023-09-24T05:46:39Z")

</div>

> [@s-t-o-r-j-user](#):
>
> Please do not get me wrong, I believe the other fields are very important, however, they are used sporadically.

You can change your dashboard however you want to suit your needs 🙂

Building this dashboard has helped me learn a lot about Powershell. It helped me brush up on my C# too. If it wasn’t for Awesome Alexey’s success script I would have not stumbled upon PowerShell at all. As you can already see he is precise and concise with his code. ❤ it 🕶

I also love your feedback. Keep it coming. I also urge other users, if any, to post their feedback if they want. Any feature request is only going to help me learn more.

---

<div class="post-metadata">

**Author:** ![s-t-o-r-j-user](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/s-t-o-r-j-user/32/7816_2.png) [@s-t-o-r-j-user](https://forum.storj.io/u/s-t-o-r-j-user)\
**Post date:** [September 24, 2023, 10:04pm UTC](https://forum.storj.io/t/cli-dashboard-for-snos/21630/25 "2023-09-24T22:04:13Z")

</div>

Xfce4-terminal with Dark Pastels

 ![cli-dash-sno3_c](https://storj-s3.bcdn.literatehosting.net/original/2X/8/82eb0f7cd0197b0e2e9123c31502dc164af8d476.png)

and

ROXterm with Tango

 ![cli-dash-sno4_c](https://storj-s3.bcdn.literatehosting.net/original/2X/b/b874fb79cdb58e0cd5b6695e8aa3f29ad64f3587.png)

> Building this dashboard has helped me learn a lot about Powershell. It helped me brush up on my C# too.

Cool. I know almost nothing about `PowerShell` and `C#`. Are you maybe also interested in `Data Parallel C++` or some just in time compiled languages like `Julia` or `Mojo` or maybe in subexponential-time quantum algorithms?

> I also love your feedback. Keep it coming.

I am not providing you any feedback, I like your dashboard, I am trying to contribute.

> If it wasn’t for Awesome Alexey’s success script I would have not stumbled upon PowerShell at all.

Yeah, this would be cool to add success rate data to this dashboard, however, I am afraid that as for this, I guess we would have to make friends with some Storj developers and even then I am not sure if this could be possible at all. As I mentioned before, one of the reasons I like your dashboard is that there is no need for a direct access to database files. It seems that to get success rate data one needs to have a direct access to the log files and rather quite substantial computing and memory resources.

> As you can already see he is precise and concise with his code.

Yeah, I noticed, also that he is running some of his nodes on port `#14324`, that implies a lot of stuff. 🙂

BTW, do you know:

- What would be the correct for loop syntax if I want to go over a few of my nodes and I have the following (corresponding) variables / values for each of my nodes:

```auto
$nameID1 = "storagenode name and hostname"
$nodeAPIID1 = 'http://ip:port/api/sno'
$commentsID1 = "Go here"
# Headers color:
$colorOneID1 = "DarkCyan"
# Values color (make it the same as the headers color if you prefer more subdued appearance):
$colorTwoID1 = "DarkGray"

```

- What may be the reason that I started getting such a wired symbols when redirecting the output of this script to a text file:

`e]8;;https://github.com/storj/storj/releases/tag/v1.86.1e\1.86.1e]8;;e\`

I am getting such symbols only for a) `currently installed version`, b) `current release` and c) `for wallet address`.

- How to execute `PowerShell` scripts over `crontab`? I did some tries, including executing this script over` crontab` with a full path to `PowerShell`, however, it seems not to work.

---

<div class="post-metadata">

**Author:** ![s-t-o-r-j-user](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/s-t-o-r-j-user/32/7816_2.png) [@s-t-o-r-j-user](https://forum.storj.io/u/s-t-o-r-j-user)\
**Post date:** [September 24, 2023, 11:10pm UTC](https://forum.storj.io/t/cli-dashboard-for-snos/21630/26 "2023-09-24T23:10:28Z")

</div>

> [@s-t-o-r-j-user](#):
>
> How to execute `PowerShell` scripts over `crontab`? I did some tries, including executing this script over` crontab` with a full path to `PowerShell`, however, it seems not to work.

I made it working. Not sure if this is the optimal way but it works. Also not sure if absolute paths are required.

In order to save the output of `Nerdboard.ps1` to a` text file`:

```auto
## Install PowerShell on Linux
[https://learn.microsoft.com/en-us/powershell/scripting/install/install-other-linux?view=powershell-7.3#binary-archives]

```

```auto
## Make a directory
$ mkdir -p /absolute/path/to/logs_nerdboard

```

```auto
## Create nerdboard.sh, make it executable and enter following content:

#!/usr/bin/pwsh

pwsh /absolute/path/to/Nerdboard.ps1 > /absolute/path/to/logs_nerdboard/$(date +%F_%H-%M-%S)_nerdboard.txt

```

```auto
## To run every day at 23:59 
$ crontab -e
59 23 * * * /absolute/path/to/nerdboard.sh

```

---

<div class="post-metadata">

**Author:** ![Toyoo](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/toyoo/32/1126_2.png) [@Toyoo](https://forum.storj.io/u/Toyoo)\
**Post date:** [September 24, 2023, 11:37pm UTC](https://forum.storj.io/t/cli-dashboard-for-snos/21630/27 "2023-09-24T23:37:59Z")

</div>

> [@s-t-o-r-j-user](#):
>
> Yeah, this would be cool to add success rate data to this dashboard, however, I am afraid that as for this, I guess we would have to make friends with some Storj developers and even then I am not sure if this could be possible at all.

There are debug counters that may help here. Comparing `upload_started_count` counter and `upload_success_count`/`upload_failure_count`/`upload_cancel_count` will give you the numbers you want.

---

<div class="post-metadata">

**Author:** ![s-t-o-r-j-user](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/s-t-o-r-j-user/32/7816_2.png) [@s-t-o-r-j-user](https://forum.storj.io/u/s-t-o-r-j-user)\
**Post date:** [September 25, 2023, 1:16am UTC](https://forum.storj.io/t/cli-dashboard-for-snos/21630/28 "2023-09-25T01:16:10Z")

</div>

> [@Toyoo](#):
>
> There are debug counters that may help here. Comparing `upload_started_count` counter and `upload_success_count`/`upload_failure_count`/`upload_cancel_count` will give you the numbers you want.

Wow - I was not aware about this fact!

I am handling the code to @nerdatwork, @Alexey and to you.

I hope that maybe you find something to be useful and that may be utilized in your potential future developments.

Btw,

tabby (two panels) with a custom theme:

 ![cli-dash-sno7_tabby_c](https://storj-s3.bcdn.literatehosting.net/original/2X/2/29fd4cb737ea90b6fab241230f574185b34962ed.png)

rxvt-unicode (don’t remember what theme):

 ![cli-dash-sno6_vscode-pwsh_c](https://storj-s3.bcdn.literatehosting.net/original/2X/3/3d28ab2e5caffe6c8005b312a96ffbf18b640657.png)

and finally VS Code PowerShell with GitHub Dark Dimmed:

 ![cli-dash-sno5_rxvt-unicode_c](https://storj-s3.bcdn.literatehosting.net/original/2X/3/3613f6e65c87be04b74db4389033234873b1feb7.png)

🙂

---

<div class="post-metadata">

**Author:** ![nerdatwork](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/nerdatwork/32/1135_2.png) [@nerdatwork](https://forum.storj.io/u/nerdatwork)\
**Post date:** [September 25, 2023, 12:44pm UTC](https://forum.storj.io/t/cli-dashboard-for-snos/21630/29 "2023-09-25T12:44:44Z")

</div>

> [@s-t-o-r-j-user](#):
>
> What would be the correct for loop syntax if I want to go over a few of my nodes and I have the following (corresponding) variables / values for each of my nodes:

It would be a normal for loop

```auto
 for ($i=0; $i -lt (number of nodes); $i++) { 
   $nameID1 = "storagenode name and hostname"
   $nodeAPIID1 = 'http://ip:port/api/sno'
   $commentsID1 = "Go here"
   # Headers color:
   $colorOneID1 = "DarkCyan"
   # Values color (make it the same as the headers color if you prefer more subdued appearance):
   $colorTwoID1 = "DarkGray" 
} 

```

> [@s-t-o-r-j-user](#):
>
> What may be the reason that I started getting such a wired symbols when redirecting the output of this script to a text file:

How are you redirecting the output?

> [@s-t-o-r-j-user](#):
>
> How to execute `PowerShell` scripts over `crontab`? I did some tries, including executing this script over` crontab` with a full path to `PowerShell`, however, it seems not to work.

Great job on figuring it out!

---

<div class="post-metadata">

**Author:** ![s-t-o-r-j-user](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/s-t-o-r-j-user/32/7816_2.png) [@s-t-o-r-j-user](https://forum.storj.io/u/s-t-o-r-j-user)\
**Post date:** [September 25, 2023, 5:47pm UTC](https://forum.storj.io/t/cli-dashboard-for-snos/21630/30 "2023-09-25T17:47:14Z")

</div>

> It would be a normal for loop.

I will try to follow your advice, however, to be honest, I do not think that initiating an array in such a way will be correctly evaluated by `PowerShell`. And it looks like a nested for loop is needed by your script in this case. Also wondering if calling variables in global or local scope makes any performance difference in `PowerShell`. To sum up, I might be wrong, its just a feeling, I know very little about `PowerShell`. Definitely, I will give it a try. Thanks.

> How are you redirecting the output?

Exactly in the way I outlined above with my `crontab` example.

> Great job on figuring it out!

Your move.

🙂

---

<div class="post-metadata">

**Author:** ![nerdatwork](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/nerdatwork/32/1135_2.png) [@nerdatwork](https://forum.storj.io/u/nerdatwork)\
**Post date:** [October 1, 2023, 12:58pm UTC](https://forum.storj.io/t/cli-dashboard-for-snos/21630/31 "2023-10-01T12:58:33Z")

</div>

Update: Oct 1, 2023

Added 👇

- Dashboard creation date at top left of the window
- Last transaction date and amount on current wallet address.  
The transaction date is 🟥 when there is no transaction from current month. It shows date in 🟢 when there is a transaction in current month. In short, if you get paid in current month date shows up in green else it shows in red. The amount shown is in Storj token.
- Monthly bandwidth data  
Its shown in three columns to avoid vertical scrolling. To minimize space “Press space to continue” is shown in same row as last day’s bandwidth data. Egress is in green while ingress is in yellow color.

PS: Thanks to @s-t-o-r-j-user for ideas, feature request and contribution 🙂 ❤

---

<div class="post-metadata">

**Author:** ![olympios](https://storj.bcdn.literatehosting.com/letter_avatar/olympios/32/5_5575768a8748004e209b776fc1b2916d.png) [@olympios](https://forum.storj.io/u/olympios)\
**Post date:** [October 2, 2023, 5:00pm UTC](https://forum.storj.io/t/cli-dashboard-for-snos/21630/32 "2023-10-02T17:00:09Z")

</div>

great work, also great “themes” from @s-t-o-r-j-user .

---

<div class="post-metadata">

**Author:** ![s-t-o-r-j-user](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/s-t-o-r-j-user/32/7816_2.png) [@s-t-o-r-j-user](https://forum.storj.io/u/s-t-o-r-j-user)\
**Post date:** [October 2, 2023, 7:11pm UTC](https://forum.storj.io/t/cli-dashboard-for-snos/21630/33 "2023-10-02T19:11:07Z")

</div>

Great stuff @nerdatwork. Would you also consider implementing comparison of debug counters like `upload_started_count` and `upload_success_count/upload_failure_count/upload_cancel_count` as per information provided above by @Toyoo?

---

<div class="post-metadata">

**Author:** ![nerdatwork](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/nerdatwork/32/1135_2.png) [@nerdatwork](https://forum.storj.io/u/nerdatwork)\
**Post date:** [October 3, 2023, 12:47am UTC](https://forum.storj.io/t/cli-dashboard-for-snos/21630/34 "2023-10-03T00:47:46Z")

</div>

> [@s-t-o-r-j-user](#):
>
> Would you also consider implementing comparison of debug counters

It would entail dealing with the log file. This would be a different project altogether.

---

<div class="post-metadata">

**Author:** ![nerdatwork](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/nerdatwork/32/1135_2.png) [@nerdatwork](https://forum.storj.io/u/nerdatwork)\
**Post date:** [October 3, 2023, 2:53am UTC](https://forum.storj.io/t/cli-dashboard-for-snos/21630/35 "2023-10-03T02:53:14Z")

</div>

Would you like to post a screenshot using the latest script? I want to see if it works as intended on other computers too 🙂

Please hide any data you don’t want to show in the screenshot.

---

<div class="post-metadata">

**Author:** ![daki82](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/daki82/32/1128_2.png) [@daki82](https://forum.storj.io/u/daki82)\
**Post date:** [October 3, 2023, 6:09am UTC](https://forum.storj.io/t/cli-dashboard-for-snos/21630/36 "2023-10-03T06:09:22Z")

</div>

> [@nerdatwork](#):
>
> It would entail dealing with the log file.

loglevel fatal all the way.  
anyway

---

<div class="post-metadata">

**Author:** ![nerdatwork](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/nerdatwork/32/1135_2.png) [@nerdatwork](https://forum.storj.io/u/nerdatwork)\
**Post date:** [October 3, 2023, 6:52am UTC](https://forum.storj.io/t/cli-dashboard-for-snos/21630/37 "2023-10-03T06:52:36Z")

</div>

> [@daki82](#):
>
> anyway

I hope to change your mind with what I can do to logs 🙂

---

<div class="post-metadata">

**Author:** ![daki82](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/daki82/32/1128_2.png) [@daki82](https://forum.storj.io/u/daki82)\
**Post date:** [October 3, 2023, 6:56am UTC](https://forum.storj.io/t/cli-dashboard-for-snos/21630/38 "2023-10-03T06:56:22Z")

</div>

may become handy when i reenable them to search for errors 🙂

---

<div class="post-metadata">

**Author:** ![EvilMalamute](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/evilmalamute/32/1133_2.png) [@EvilMalamute](https://forum.storj.io/u/EvilMalamute)\
**Post date:** [October 3, 2023, 7:53am UTC](https://forum.storj.io/t/cli-dashboard-for-snos/21630/39 "2023-10-03T07:53:18Z")

</div>

How can Powershell be installed in Linux? Is there any small manual?

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [October 3, 2023, 8:00am UTC](https://forum.storj.io/t/cli-dashboard-for-snos/21630/40 "2023-10-03T08:00:44Z")

</div>

> **[Install PowerShell on Linux - PowerShell](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-linux?view=powershell-7.3)**
>
> This article lists the Linux distributions and package managers that are supported for installing PowerShell.

---

<div class="post-metadata">

**Author:** ![s-t-o-r-j-user](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/s-t-o-r-j-user/32/7816_2.png) [@s-t-o-r-j-user](https://forum.storj.io/u/s-t-o-r-j-user)\
**Post date:** [October 3, 2023, 12:21pm UTC](https://forum.storj.io/t/cli-dashboard-for-snos/21630/41 "2023-10-03T12:21:51Z")

</div>

> [@nerdatwork](#):
>
> > [@s-t-o-r-j-user](#):
> >
> > Would you also consider implementing comparison of debug counters
> 
> It would entail dealing with the log file. This would be a different project altogether.

After reading @Toyoo information above, my initial understanding was that this method does not require access to logs. I admit that until now, I did not take any closer look at this topic. Any additional comments @Toyoo, @Alexey?

> [@nerdatwork](#):
>
> Would you like to post a screenshot using the latest script?

I noticed some mismatches related to tabs and spaces but overall it is really useful. In general, my suggestion would be to do additional grouping of items thus making it as simple as possible to read. Using only two colors is making comprehending information faster in my opinion, however, it is a personal taste - I mean two main colors plus the alert ones (red and yellow).

[Previous page](https://forum.storj.io/t/cli-dashboard-for-snos/21630.md?page=1)

[Next page](https://forum.storj.io/t/cli-dashboard-for-snos/21630.md?page=3)
