群晖216++常用命令及dokcer使用笔记「持续更新」

群晖216++常用命令及dokcer使用笔记「持续更新」

本文结合群晖NAS设备:216++,以下不在做说明

输入uname –a 回车,用 uname 命令能够看到 NAS 的 CPU 架构、指令集等内容如下:

Linux DSM 3.10.105 #23739 SMP Fri Jun 8 12:51:05 CST 2018 x86_64 GNU/Linux synology_braswell_216+II

使用命令 docker info 查看docker详细信息,

如果提示 Cannot connect to the Docker daemon. Is the docker daemon running on this host? 说明当前的账号没有 root 权限,可以使用 sudo 提权来操作,或者可以通过切换到 root 账户下来操作,这里我们选择后者。

通过 admin 账号登录后,执行 sudo su – 切换到 root 账户下(注意这一步输入的是admin账号的密码):docker详细信息如下:

root@DSM:~# docker info
Containers: 1
Running: 1
Paused: 0
Stopped: 0
Images: 1
Server Version: 17.05.0-ce
Storage Driver: btrfs
Logging Driver: db
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: fd189da3e13a3ef3d6d9eb73c5cd4697b4536cdd (expected: 9048e5e50717ea4497b757314bad98ea3763c145)
runc version: a2d6e07aab95ff37fb63cf5dec3c40d29940194f (expected: 9c2d8d184e5da67c95d601382adf14862e4f2228)
init version: 7a83305 (expected: 949e6fa)
Security Options:
apparmor
Kernel Version: 3.10.105
Operating System: <unknown>
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.779GiB
Name: DSM
ID: MU2J:7IFS:4XFR:VNCO:66BI:IFKL:KA6F:4KPH:KTID:VJWL:EQ6K:ZFFU
Docker Root Dir: /volume1/@docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

WARNING: No kernel memory limit support
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support

在群晖下的操作命令都要加上 syno 前缀来操作,执行命令 synoservice 或 synoservice –help:

SynoService Tool Help (Version 23739)
Usage: synoservice
–help Show this help
–help-dev More specialty functions for deveplopment
–is-enabled [ServiceName] Check if the service is enabled
–status [ServiceName] Get the status of specified services
–enable [ServiceName] Set runkey to yes and start the service (alias to –start)
–disable [ServiceName] Set runkey to no and stop the service (alias to –stop)
–hard-enable [ServiceName] Set runkey to yes and start the service and its dependency (alias to –hard-start)
–hard-disable [ServiceName] Set runkey to no and stop the service and its dependency (alias to –hard-stop)
–restart [ServiceName] Restart the given service
–reload [ServiceName] Reload the given service
–pause [ServiceName] Pause the given service
–resume [ServiceName] Resume the given service
–pause-by-reason [ServiceName] [Reason] Pause the service by given reason
–resume-by-reason [ServiceName] [Reason] Resume the service by given reason
–pause-all (-p) [Reason] (Event) Pause all service by given reason with optional event(use -p to include packages)
–pause-all-no-action (-p) [Reason] (Event) Set all service runkey to no but leave the current service status(use -p to include packages)
–resume-all (-p) [Reason] Resume all service by given reason(use -p to include packages)
–reload-by-type [type] (buffer) Reload services with specified type
–restart-by-type [type] (buffer) Restart services with specified type
Type may be {file_protocol|application}
Sleep $buffer seconds before exec the command (default is 0)

通过 synoservicecfg –list 命令来查看当前群晖系统下所有运行的服务:

DSM
apparmor
atalk
avahi
bluetoothd
bonjour
btacd
crond
cups-lpd
cupsd
dbus
dc-output
ddns
findhost
ftpd
ftpd-ssl
gcpd
heartbeat
hotplugd
iscsitrg
ldap-server
miniupnpd-handler
natpmpd
nfsd
nginx
nmbd
nslcd
ntpd-client
ntpd-server
pgsql
pkgctl-AudioStation
pkgctl-Docker
pkgctl-DownloadStation
pkgctl-FileStation
pkgctl-HyperBackup
pkgctl-MediaServer
pkgctl-Node.js_v4
pkgctl-OAuthService
pkgctl-Perl
pkgctl-SynoFinder
pkgctl-SynologyApplicationService
pkgctl-SynologyDrive
pkgctl-SynologyMoments
pkgctl-USBCopy
pkgctl-VideoStation
pppoerelay
rsyncd
s2s_daemon
samba
scemd
sftp
snmp
ssdp
ssh-shell
support-remote-access
synoagentregisterd
synobackupd
synocacheclient
synocachepinfiletool
synocgid
synoconfd
synocontentextractd
synocrond
synogpoclient
synoindexd
synologanalyzer
synologrotate
synomkflvd
synomkthumbd
synomount
synonetd
synoovs-db
synoovs-vswitch
synoperfeventd
synorelayd
synosnmpcd
synostoraged
synotifyd
synotunnel
synovpnclient
synowifid
synowstransfer
syslog-acc
syslog-ng
syslog-notify
system
telnetd
tftp
upnpd
ups-net
ups-usb
usbipd
winbindd

以上看到通过群晖的 “套件中心” 添加的套件程序的服务名称均以 pkgctl- 为前缀来命名。

查看网卡信息root账户输入:ifconfig进行查看

[secret key=’kaixinit’]

docker0 Link encap:Ethernet HWaddr 02:42:F3:0D:09:92
inet addr:172.17.0.1 Bcast:0.0.0.0 Mask:255.255.0.0
inet6 addr: fe80::42:f3ff:fe0d:992/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:24 errors:0 dropped:0 overruns:0 frame:0
TX packets:3949 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1220 (1.1 KiB) TX bytes:506345 (494.4 KiB)

eth0 Link encap:Ethernet HWaddr 00:11:32:6E:B5:83
inet addr:192.168.88.214 Bcast:192.168.88.255 Mask:255.255.255.0
inet6 addr: fe80::211:32ff:fe6e:b583/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:714870 errors:0 dropped:0 overruns:0 frame:0
TX packets:204975 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:408089970 (389.1 MiB) TX bytes:50223456 (47.8 MiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:9770 errors:0 dropped:0 overruns:0 frame:0
TX packets:9770 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2042668 (1.9 MiB) TX bytes:2042668 (1.9 MiB)

root@DSM:~# ifconfig
docker0 Link encap:Ethernet HWaddr 02:42:F3:0D:09:92
inet addr:172.17.0.1 Bcast:0.0.0.0 Mask:255.255.0.0
inet6 addr: fe80::42:f3ff:fe0d:992/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:24 errors:0 dropped:0 overruns:0 frame:0
TX packets:3949 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1220 (1.1 KiB) TX bytes:506345 (494.4 KiB)

eth0 Link encap:Ethernet HWaddr 00:11:32:6E:B5:83
inet addr:192.168.88.214 Bcast:192.168.88.255 Mask:255.255.255.0
inet6 addr: fe80::211:32ff:fe6e:b583/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:714894 errors:0 dropped:0 overruns:0 frame:0
TX packets:205016 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:408094793 (389.1 MiB) TX bytes:50231409 (47.9 MiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:9770 errors:0 dropped:0 overruns:0 frame:0
TX packets:9770 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2042668 (1.9 MiB) TX bytes:2042668 (1.9 MiB)

[/secret]

 

原创文章,作者:开心电脑网,如若转载,请注明出处。

(0)
上一篇 2018年6月16日
下一篇 2018年7月2日

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注