Server IP : 104.21.38.3 / Your IP : 172.70.93.14 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /snap/lxd/current/commands/ |
Upload File : |
#!/bin/sh set -u # Re-exec outside of apparmor confinement if [ -d /sys/kernel/security/apparmor ] && [ "$(cat /proc/self/attr/current)" != "unconfined" ]; then exec aa-exec -p unconfined -- "$0" "$@" fi # Check that we're root if [ "$(id -u)" != "0" ]; then echo "error: This tool must be run as root." exit 1 fi # Environment export LXD_DIR="${LXD_DIR:-"${SNAP_COMMON}/lxd/"}" echo "# Base information" if [ -e "/var/lib/snapd/hostfs/etc/os-release" ]; then # shellcheck disable=SC1091 . /var/lib/snapd/hostfs/etc/os-release echo " - Distribution: ${NAME}" echo " - Distribution version: ${VERSION}" else echo " - Distribution: unknown (no os-release)" fi echo " - Kernel version: $(uname -a)" echo " - LXC version: $(lxc --version)" echo " - LXD version: $(lxd --version)" echo " - Snap revision: ${SNAP_REVISION}" echo "" echo "# Detailed snap information" echo '```' nsenter -t 1 -m snap info lxd echo '```' echo "" echo "# Detailed LXD information" if lxc info >/dev/null 2>&1; then echo "## Daemon configuration" echo '```' lxc info echo '```' echo "" echo "## Instances" echo '```' lxc list echo '```' echo "" echo "## Images" echo '```' lxc image list echo '```' echo "" echo "## Storage pools" echo '```' lxc storage list echo '```' echo "" echo "## Networks" echo '```' lxc network list echo '```' echo "" echo "## Projects" echo '```' lxc project list echo '```' echo "" echo "## Profiles" echo '```' lxc profile list echo '```' echo "" echo "## Default profile" echo '```' lxc profile show default echo '```' echo "" if lxc cluster list >/dev/null 2>&1; then echo "## Cluster" echo '```' lxc cluster list echo '```' echo "" fi else echo "LXD daemon unreachable" echo "" fi echo "# Kernel log (last 50 lines)" echo '```' dmesg | tail -n 50 echo '```' echo "" echo "# Daemon log (last 50 lines)" echo '```' tail -n 50 "${SNAP_COMMON}/lxd/logs/lxd.log" echo '```' echo "" echo "# Systemd log (last 50 lines)" echo '```' nsenter -t 1 -m journalctl -u snap.lxd.daemon -n50 | cat echo '```'