sjoerd

Members
  • Posts

    125
  • Joined

  • Last visited

Everything posted by sjoerd

  1. That cool's - I was not aware about that, still - I want to understand the plg thingy and I already made a couple of classes in python that gather data from the ini-files, and sends them to the lcd using a uart. I usually want to try it myself, if I think its doable with the knowledge I got, before I get "ready-to-go" plugins ๐Ÿ™‚. Been tinkering with atmeg and esp for quite some time and thought this would be cool (but as always - whatever you come up with, you are not the first one
  2. I got two goals here. The first one is obviously to learn more about unraid, slack and how to make unraid plugins. Second goal is more practical: I'm trying to create put a netdev_stats.ini (just a name I came up with) along with al the other ini's in /var/local/emhttp/state that gathers the current bandwidth from various interfaces. As far as I can tell it's not available. Well, third goal is to actually use that ini for a 4x20 lcd display I'm working on to display cpu, parity status, bandwidth maybe how much space is left. For now the raw bash script and rc script only get current rx/tx bytes from the interface, no bandwidth calculation yet although I already had that mechanism working for an other project. Just need to implement that. Output sofar (still need to filter out unwanted/need interfaces) and is refreshed every second: ``` cat /var/local/emhttp/netdev_stats.ini [eth0] rx=19769200081 tx=1175170966119 [bond0] rx=19769200081 tx=1175170966119 [vhost0] rx=17744066178 tx=1125304306954 [docker0] rx=1088068 tx=1328220 [macvtap0] rx=130047218 tx=226070299 [veth1fe2317] rx=774598 tx=827228 [veth6ee30bd] rx=0 tx=2126 [vethd83e77e] rx=130137 tx=1428591 [veth21b8a2c] rx=0 tx=49676 [vethcdc0f00] rx=99847108 tx=3512523901 [veth5b30f33] rx=0 tx=2126 ``` Next iteration is ofc that actual bandwidth is shown on tx/rx. I think only eth0 and/or bond0 are usefull tho. So @ich777 what you are saying is that I should make a txz with the files in their appropriate path and only put the symlinks and chown command in the plg.. Will also check the install plugin page - I have seen that page but faded since we only use the CA nowadays ๐Ÿ™‚ @primeval_god I will check those out (also the links @ich777 posted. Disclaimer: the scripts might not 100% bulletproof and maybe some things are not done the right way. netdev_stats.plg netdev_stats.sh rc.netdev_stats
  3. Hey guys, I'm trying to understand how the plugin system works. Sofar the only thing I'm trying to achive is "installing" a bash script to /usr/local/bin and the rc script that is needed to start/stop it. The two scripts are working if I copy them manually to their locations. Also had a version that involved copying them to their location by adding them to the flaskdrive and tinker with the go script but the go script is executed way after the plugins got installed. I tried to reverse engineer some plugins and figured that the bash and rc file could be embedded in de .plg. Can't be hard right? After I rebooted the plugin ended up in /boot/config/pluging-error so I expected some logging since nothing showed up in /var/log/syslog. Please tell me where plugin installation logs are. Eg. I'm not creating an elaborate frontend page to start or stop of enable/disable te service, at least not for now since I'm not going to publish it. I just want fire up a script as service when unraid starts - whenever the array is started or not.. Sidenote: I think it would be awesome if limetech would create documentation about how the plugin-system works and what to do and what you deffo should not do -
  4. Hey guys, Once a week I check for docker image updates and today the GitLAB-Ce image did not want to update due to the fact that the docker image run out of space. This is kind of weird since various tools (docker container size, unraid_check_docker_script from spaceinvaderone) all tell me there should be enough space left. To continue I added 10G to the image which is now 30G. This is taken after pruning orphaned layers. What I do not understand is why space used says 14.43G (which is about right I think) but the devid section says there is 20.94G in use of the 30G docker image size.. It seems that there is 6G being used somewhere. This is the output of SpaceinvaderOne's script which seems also fine, expect for a lot of unconnected - (or unnamed) volumes. All the volumes I have are mounted to /mnt/user/appdata/something-somthing and are on a nvme cachepool (single nvme) - Yes there are two wordpress containers sharing the same image. unraid_docker_check_script.txt If anyone could tell me where the 6G is and how to reclaim that - would be great (also gives me some extra knowledge if it happens again) Regards Sjoerd
  5. oke - then i'll test in with an older stick - got some 64G's laying around -
  6. Hey, (tried to find existing topic but did not succeed) The usbstick of my second unraid server is reporting damaged blocks. I tried to fix them but only made it worse. Two years ago I bought the samsung fit 32G (Thanks @SpaceInvaderOne for that awesome video on youtube) but it seems 32G or smaller is very hard to come by these days so - does the 32G limit for the bootflash still stands or would a 64G version work as well? Regards Sjoerd
  7. Hey Guys, I have a bunch of bashscripts/libraries (at /mnt/user/appdata/scripts/bshlib/) that I want to map to a container folder (eg /root/bshlib) but I want this path to variable so I already tinkered that the go script to export BASHLIB=/mnt/user/appdata/scripts/bshlib I also added in the advanced section of the docker startup to following: -v "${BASHLIB}":"/root/bshlib". But when I apply it the docker fails to see the environment variable -v '/mnt/user/appdata/mariadb':'/config':'rw' -v "${BASHLIB}":"/root/bshlib" docker: invalid spec: :/root/bshlib: empty section between colons. Yes I have rebooted unraid and yes the variable is present when I login (as root): # env | grep BASH BASHLIB=/mnt/user/appdata/scripts/bshlib When I execute the statement that is in de "Command execution" box is runs fine so.. I think when the docker manager executes the command it has no knowledge of the BASHLIB variable. The variable is exported in de go script and for testing I also added is to /root/.bash_profile (using the go script so it's there after a reboot". I'm planning on using this a lot so if I want (or need) to change the path I don't want to go over all the containers. Regards
  8. Hey, I'm tinkering with an 4x20 lcd display so I can show some basic info as disk- and cpu usage. cpu and disk usage is quite simple to get (/local/emhttp or something - found files there that are updated almost every second). But how can I get info if the mover is running or the parity status (oke, checking + percentage, not oke). I want this thing to start when unraid is done booting (so if array wont start i still can see that)
  9. I think this should never happen: Nov 9 12:42:41 Athenaeum ntpd[10567]: bind(20) AF_INET 192.168.0.20#123 flags 0x19 failed: Address already in use Nov 9 12:42:41 Athenaeum ntpd[10567]: unable to create socket on br0 (62) for 192.168.0.20#123 Nov 9 12:42:41 Athenaeum ntpd[10567]: failed to init interface for address 192.168.0.20 You sure you not accidentally assigned a static address You also need to look into this on unless you yanked out the plug - crusty wallsocket maybe? Nov 9 11:38:45 Athenaeum apcupsd[5004]: Power failure. Nov 9 11:38:47 Athenaeum apcupsd[5004]: Power is back. UPS running on mains.
  10. I can't vote using the pole (no fb - for reasons) - but snapshotting the vm's and reverting them is i.m.h.o a must have - not sure how to implement something like that but i love the way virtualbox or xencenter/server does it - i got no experience with vmware so not how they do it.. (edit: going through this thread it seems I repeated myself) @pras1011 why on earth do you want wifi support? If it's that big of a deal yank in a wifi router and configure it as repeater or something. A server should be (imho) on a wired network. Far more stable that wifi. And if speeds it the thing (wifi6) faster then 1G these days, idunno, then yank in a 2,5 or 10G adapter and replace the switches.
  11. Ahh yeah - I figured you did something like that, so I tried to find some documentation on that but failed (or my search failed). Thanks - Thx for the code-snippets. Good boilerplate to start with. I assume your unraid gui runs on 888 ? Would be nice tho if you could post it when it's more user friendly. Would also be awesome if the entire dashboard- and main-page are available in json format by default. Imagine what you can do with that. Not just for home assistant but also for arduino/esp you name it.
  12. How did you get all those readings into hassio? Did you make an endpoint/api in unraid to gather them from within hassio using a custom entity. I really would like to have something like that too - esp temp drive/cpu temps and if also if mover or parity check is active. Could you share (if not already - thread kinda huge) them?
  13. Moving all my vm related services to my 2nd unraid server where they live as containers so this plugin is very handy but... ...and maybe I overlook this in the documentation: I got a couple of non-docker folders and those are quite heavy on reading and writing (syslog, REST-api call and logging those) and they are not backup-ed. Not entirely sure if aappdata is the correct place for those directories (appdata in on a nvme cachepool). Is there a mechanism that tells the mover to mirror data with the array (or actually sync to the array) instead of moving from or to the array?
  14. I got some weird behavior regarding to i915 to on a new motherboard - but that was during boot and unraid did not even get to the boot-selection menu: Turned out I used incompatible memory (kingston hyperx) although memtest86 ran over 24h without any errors. I replaced the memory with cheap-ass memory and did not have any error after. My kernel warning were ofc different but it might be an idea - if you got some spare memory laying around - the swap out and see what happens. You could check if the memory you are using is in the compatibility-list for the board you are using.
  15. Can you check which bios/firmware you have and what memory did you equip it with ? I flash the firmware 2 weeks ago and unraid still crashes.. Althoug memtest86 passes over I hate that it that mine doesnt work
  16. Is this from inside the docker (I assume it is)? Can you from inside the docker "touch" something. From within the docker my configs are root:root and 0644. From outside (/mnt/user/appdata/mosquitto) they are also root:root and 0644 but I got a very simple setup and dont even have a /config inside the docker . โ””โ”€โ”€ mosquitto โ”œโ”€โ”€ config โ”‚ โ””โ”€โ”€ mosquitto.conf โ”œโ”€โ”€ data โ”œโ”€โ”€ log โ”œโ”€โ”€ mosquitto-unraid-default.conf โ”œโ”€โ”€ mosquitto.conf โ””โ”€โ”€ passw This is my directory structure - is root from with docker and appdata. I dont think config/mosquitto.conf is being used but mosquitto-unraid-default and the mosquitto.conf on same level are! Just question: What's the benefit of storing the in-memory db - afterall its a msg broker.
  17. Morning guys (and ladies) I created little python script that sends data to an arduino nano every second. To make this work I took the following stept: - Installed python3, python3 setup tools and pip from the nerdpack - no issues there - Created the following directory for the python-script and pythons virtual enviroment: /mnt/user/appdata/python/cpuusage - Inside I created the virtual environment with python3 -m venv venv source ./venv/bin/activate pip install --upgrade pip pip install psutil pyserial - Then I copied the script to this directory and started it with python cpuusage-to-serial.py. All good. The display show how busy the server is and follows (h)top quite good. Since I want this to run when the array starts (Its not available because the script is placed on the array - I thought I would not be a good idea to place it on the stick) I created a little user.script: #!/bin/bash #description=Sends cpu usage to arduino nano #arrayStarted=true cd /mnt/user/appdata/python/cpuusage . ./venv/bin/activate python cpuusage-to-serial.py 2>&1 I started to script in the foreground and the script started and the display showed what I expected. After setting the schedule to "At Startup Of Array" and hitting Apply I rebooted the array. After the array got back up the script got started and the display starts to show cpu usage - sweet. But now it gets weird: When I go to user.scripts and abort the script, unraid says "aborted" but the script is still running in the background. Also. whenever I stop the script using user.scripts or let it run. When I want to stop the array I get this message in the log: Oct 27 09:10:47 towerpve root: rmdir: failed to remove '/mnt/user': Device or resource busy Oct 27 09:10:47 towerpve emhttpd: shcmd (279462): exit status: 1 Oct 27 09:10:47 towerpve emhttpd: shcmd (279464): /usr/local/sbin/update_cron Oct 27 09:10:47 towerpve emhttpd: Retry unmounting user share(s)... Oct 27 09:10:52 towerpve emhttpd: shcmd (279466): /usr/sbin/zfs unmount -a Oct 27 09:10:52 towerpve emhttpd: shcmd (279467): umount /mnt/user Oct 27 09:10:52 towerpve root: umount: /mnt/user: target is busy. Oct 27 09:10:52 towerpve emhttpd: shcmd (279467): exit status: 32 Oct 27 09:10:52 towerpve emhttpd: shcmd (279468): rmdir /mnt/user When I kill /mnt/user/appdata/python/cpuusage/cpuusage-to-serial.py the array continues the stopping procedure. I think I need to make this user.script thingy a true daemon but I have no idea how and probably can't because everything is on the stick and having a entire python venv on it is imho not a good idea. I have no idea where to place the script (well except on /boot/config/plugins/user.scripts/scripts but that is rather limited since it only can execute "script" and I though it is not even executed from there. And why does the script not abort like it should? This is the "heart" of the script - I left out all helper methods since they do not matter: def get_cpu_usage(): threading.Timer(SPEED, get_cpu_usage).start() serial_data = [] pct_per_core = psutil.cpu_percent(percpu=True) for core, pct in enumerate(pct_per_core): if core < CORES: level = pct2bar(pct) serial_data.append(str(level)) send_data(f"<{';'.join(serial_data)}>") get_cpu_usage() On my test rig I created a systemd unit-file and works a charm but that's not unraid, not even slack. Any thoughts how to make this work the proper way? I'm not even sure I need to use user.scripts.
  18. Hello, Which of the two templates do I need to use? The official (which got updated quite recently) - or the v2 beta? Thanks.
  19. I got a question about folder caching and remote shares I noticed a lot network activity between my two unraid servers. Seems my "slave" that has a mount to root_share on my "master". I could I first not see what or why - then I checked the "master" and showed the more or less the same. When I did an lsof of mount on the slave I showed a folders on remote iterating through the entire directory tree on the master. I checked if I could exclude shares but only local shares can be excluded. Would be very nice if there was an option to exclude files on remote shares.
  20. Looks a lot like a home automation (hassio) dashboard, but I could be wrong
  21. Hey Team, Thanks for the new release - Update got applied without issues (never having issues upgrading to stable releases) I was hoping on the "take snapshot" feature on the VMS page. I miss this so much. I tried to create them using the terminal but failed
  22. Just came across this thread - my cwwk board is still collecting dust after numerous attempts to get it stable... Did you need to hack in kernel parameters or was it stable "out of the box" - if so which bios (or board version if there are any versions) f.y.i. i post quite some items in the topic on servethehome (as Sjoerd obv.) See
  23. Any users with this motherboard or particular errors?