群晖常用指令

输入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进行查看

上一篇:从0开发3D引擎(七):学习Reason语言


下一篇:Promise 基础