Jump to content

Squid

Community Developer
  • Posts

    28,770
  • Joined

  • Last visited

  • Days Won

    314

Everything posted by Squid

  1. Being close counts in horseshoes and CA Sent from my LG-D852 using Tapatalk
  2. Yeah I know. Documentation always lags because quite frankly it's not fun to do Sent from my LG-D852 using Tapatalk
  3. Unless I'm mistaken, (could very well be) Means that when changing the CPU pinning on the VM, if the VM has an emulator pin entry in the XML, then it will be preserved.
  4. You could always look on the flash drive /config/plugins/ca.backup/BackupOptions.json
  5. #!/usr/bin/php <?PHP $startStopped = true; require_once("/usr/local/emhttp/plugins/dynamix.docker.manager/include/DockerClient.php"); $DockerClient = new DockerClient(); $DockerTemplates = new DockerTemplates(); $info = getRunningContainers(); foreach ($info as $contName=>$cont) { if ( $startStopped && ! $cont['running'] ) { $DockerClient->startContainer($cont['Id']); } if ( $cont['running'] || $startStopped ) { echo "$contName Size: "; $size = rtrim(exec("docker exec $contName du -shx / 2>/dev/null"),"/ ") ?: "N/A"; echo "$size Logs: ".human_filesize(exec("docker logs $contName 2>&1 | wc -c"),1)."\n"; } if ( ! $cont['running'] && $startStopped ) { $DockerClient->stopContainer($cont['Id']); } } function human_filesize($bytes, $decimals = 2) { $size = array('B','kB','MB','GB','TB','PB','EB','ZB','YB'); $factor = floor((strlen($bytes) - 1) / 3); return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$size[$factor]; } function getRunningContainers() { global $DockerClient, $DockerTemplates; $containers = $DockerClient->getDockerContainers(); $info = $DockerTemplates->getAllInfo(); foreach ($containers as $container) { $info[$container['Name']]['running'] = $container['Running']; $info[$container['Name']]['Id'] = $container['Id']; $infoTmp[$container['Name']] = $info[$container['Name']]; } return $infoTmp ?: array(); } ?>
  6. you can try changing the docker exec entry to be docker exec $contName du -shx / 2>/dev/null
  7. I was overruled when I argued for that https://github.com/limetech/webgui/pull/378
  8. Very good catch. @CHBMB the install script should @unlink("/boot/config/plugins/dynamix.plg"); before popping up the reboot prompt. Otherwise this will come up again and again (and that file hasn't been used forever)
  9. If you remove the starting "#" on the third line, it will start any stopped containers (and stop them after getting their size) #!/usr/bin/php <?PHP #$startStopped = true; require_once("/usr/local/emhttp/plugins/dynamix.docker.manager/include/DockerClient.php"); $DockerClient = new DockerClient(); $DockerTemplates = new DockerTemplates(); $info = getRunningContainers(); foreach ($info as $contName=>$cont) { if ( $startStopped && ! $cont['running'] ) { $DockerClient->startContainer($cont['Id']); } if ( $cont['running'] || $startStopped ) { echo "$contName Size: ".rtrim(exec("docker exec $contName du -shx /"),"/")." Logs: "; echo human_filesize(exec("docker logs $contName 2>&1 | wc -c"),1)."\n"; } if ( ! $cont['running'] && $startStopped ) { $DockerClient->stopContainer($cont['Id']); } } function human_filesize($bytes, $decimals = 2) { $size = array('B','kB','MB','GB','TB','PB','EB','ZB','YB'); $factor = floor((strlen($bytes) - 1) / 3); return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$size[$factor]; } function getRunningContainers() { global $DockerClient, $DockerTemplates; $containers = $DockerClient->getDockerContainers(); $info = $DockerTemplates->getAllInfo(); foreach ($containers as $container) { $info[$container['Name']]['running'] = $container['Running']; $info[$container['Name']]['Id'] = $container['Id']; $infoTmp[$container['Name']] = $info[$container['Name']]; } return $infoTmp ?: array(); } ?>
  10. The GUI will allow you to assign multiple isolated cores to a container. The theory is that you should know exactly what you are doing should you do this. On the CPU pinning page in Settings, its easy to bounce back and forth to see if there is a conflict. Fix Common Problems however will also look for a conflict between isolated cores and multiple core pinning to docker containers and issue a warning.
  11. Template author mode in CA simply keeps the legacy mode button active all the time so that you can see what your template looks like without waiting for the feed to update. What you're looking for is the setting in settings - docker Sent from my LG-D852 using Tapatalk
  12. You can't exec into a stopped container, so the best you can get is the output of docker images which is only the image size , and not any additional files put into the container Sent from my LG-D852 using Tapatalk
  13. That's New (I mean a "new" unadvertised feature)
  14. Get the size of the image (more or less) for each running container. Useful to see if a massively misconfigured container is ballooning your docker.img. Now includes log sizes #!/usr/bin/php <?PHP require_once("/usr/local/emhttp/plugins/dynamix.docker.manager/include/DockerClient.php"); $DockerTemplates = new DockerTemplates(); $info = $DockerTemplates->getAllInfo(); foreach ($info as $contName=>$cont) { if ( $cont['running'] ) { echo "$contName Size: ".rtrim(exec("docker exec $contName du -shx /"),"/")." Logs: "; echo human_filesize(exec("docker logs $contName 2>&1 | wc -c"),1)."\n"; } } function human_filesize($bytes, $decimals = 2) { $size = array('B','kB','MB','GB','TB','PB','EB','ZB','YB'); $factor = floor((strlen($bytes) - 1) / 3); return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$size[$factor]; } ?>
  15. CA blocks new installs of it (because its been deprecated). Only if you've previously had it installed will it allow you to reinstall. It just doesn't work quite right under latter versions of unRaid.
  16. Thanks. It's what happens during copies and pasted from a different code base of mine Sent from my SM-T560NU using Tapatalk
  17. Get the size of the image (more or less) for each running container. Useful to see if a massively misconfigured container is ballooning your docker.img. Does not however consider the log sizes #!/usr/bin/php <?PHP require_once("/usr/local/emhttp/plugins/dynamix.docker.manager/include/DockerClient.php"); $DockerTemplates = new DockerTemplates(); $info = $DockerTemplates->getAllInfo(); foreach ($info as $contName=>$cont) { if ( $cont['running'] ) { echo "$contName Size: ".rtrim(exec("docker exec $contName du -shx /"),"/")."\n"; } } ?>
  18. https://forums.unraid.net/topic/47269-ftp-does-not-stay-disabled-on-a-reboot/?tab=comments#comment-466758
  19. You can keep it disabled by the Tips & Tweaks plugin, although if there is no users listed under FTP settings, then the service is not actually running.
  20. Its in RAM. Personally, I just set /tmp to be a folder within appdata
×
×
  • Create New...