Comments (8)
I added again and its still working. Dont know why I didn't get output the first time. But its working fine now.
from fancy-motd.
Post the output of df -h --local --print-type
here.
from fancy-motd.
Bestandssysteem Type Grootte Gebruikt Besch Geb% Aangekoppeld op
udev devtmpfs 16G 0 16G 0% /dev
tmpfs tmpfs 3,2G 1,7M 3,2G 1% /run
/dev/sdb2 ext4 456G 12G 422G 3% /
tmpfs tmpfs 16G 0 16G 0% /dev/shm
tmpfs tmpfs 5,0M 4,0K 5,0M 1% /run/lock
/dev/sdb1 vfat 511M 3,5M 508M 1% /boot/efi
/dev/loop0 squashfs 82M 82M 0 100% /snap/gtk-common-themes/1534
/dev/loop2 squashfs 128K 128K 0 100% /snap/bare/5
/dev/loop1 squashfs 256K 256K 0 100% /snap/gtk2-common-themes/13
/dev/loop4 squashfs 112M 112M 0 100% /snap/core/13250
/dev/loop3 squashfs 56M 56M 0 100% /snap/core18/2409
tmpfs tmpfs 3,2G 68K 3,2G 1% /run/user/1000
tmpfs tmpfs 3,2G 60K 3,2G 1% /run/user/116
from fancy-motd.
This should work with no issue.
Could you apply this patch. It add some debug lines since I'm curious if the $disks
variable is set and if it loops through the loop.
diff --git a/modules/32-disk b/modules/32-disk
index fa29222..d79f8d9 100755
--- a/modules/32-disk
+++ b/modules/32-disk
@@ -1,6 +1,5 @@
#!/usr/bin/env bash
-set -euo pipefail
source "$BASE_DIR/framework.sh"
excluded_types=(
@@ -12,10 +11,18 @@ excluded_types=(
disks="$(df -h --local --print-type $(printf " -x %s" "${excluded_types[@]}") | tail -n +2 | sort -u -k 7)"
+echo "df -h --local --print-type $(printf " -x %s" "${excluded_types[@]}")"
+echo "########################"
+
+echo "$disks"
+echo "########################"
+
text=""
while IFS= read -r disk; do
IFS=" " read -r filesystem type total used free percentage mountpoint <<< $disk
+ echo $filesystem $type $total $used $free $percentage $mountpoint
+
device="$(sed 's|/dev||g;s|/mapper||g;s|/||g' <<< $filesystem)"
left_label="$device () - $used used, $free free"
right_label="/ $total"
Output should look something like this:
Logged as: rhoriguchi@Ryan-Laptop
OS: NixOS
IP addresses: XXX.XXX.XXX.XXX
Public IP address: XXX.XXX.XXX.XXX
Memory: RAM - 14G used, 15G available / 30G
[================================================]
df -h --local --print-type -x devtmpfs -x ecryptfs -x squashfs -x tmpfs df -h --local --print-type -x devtmpfs -x ecryptfs -x squashfs -x tmpfs
######################## ########################
/dev/nvme0n1p2 ext4 938G 555G 336G 63% / /dev/nvme0n1p2 ext4 938G 555G 336G 63% /
/dev/nvme0n1p1 vfat 511M 70M 442M 14% /boot /dev/nvme0n1p1 vfat 511M 70M 442M 14% /boot
######################## ########################
/dev/nvme0n1p2 ext4 938G 555G 336G 63% / /dev/nvme0n1p2 ext4 938G 555G 336G 63% /
/dev/nvme0n1p1 vfat 511M 70M 442M 14% /boot /dev/nvme0n1p1 vfat 511M 70M 442M 14% /boot
Disk space: nvme0n1p2 (/) - 555G used, 336G free / 938G
[================================================]
nvme0n1p1 (/boot) - 70M used, 442M free / 511M
[================================================]
Services: ▲ SSH
Docker: no containers
Updates: N/A available
from fancy-motd.
I got output now:
df -h --local --print-type -x devtmpfs -x ecryptfs -x squashfs -x tmpfs df -h --local --print-type -x devtmpfs -x ecryptfs -x squashfs -x tmpfs
######################## ########################
/dev/sdb2 ext4 456G 12G 422G 3% / /dev/sdb2 ext4 456G 12G 422G 3% /
/dev/sdb1 vfat 511M 3.5M 508M 1% /boot/efi /dev/sdb1 vfat 511M 3.5M 508M 1% /boot/efi
######################## ########################
/dev/sdb2 ext4 456G 12G 422G 3% / /dev/sdb2 ext4 456G 12G 422G 3% /
/dev/sdb1 vfat 511M 3.5M 508M 1% /boot/efi /dev/sdb1 vfat 511M 3.5M 508M 1% /boot/efi
Disk space: sdb2 (/) - 12G used, 422G free / 456G
[================================================]
sdb1 (/boot/efi) - 3.5M used, 508M free / 511M
[================================================]
from fancy-motd.
Thanks for your help! I got it working now. I had to remove : set -euo pipefail
from fancy-motd.
You shouldn't need to remove set -euo pipefail
, that means something in that file is failing. But you seem to get disk info and it's parsed correctly.
from fancy-motd.
@alainlankers Closing for now since the issue cannot be reproduced. If you experience the problem again don't hesitate to reopen the issue 😃
@rhoriguchi Thanks for providing help!
from fancy-motd.
Related Issues (9)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fancy-motd.