SSDB基础2

2022-04-23 18:30:32 浏览数 (1)

查看线程

代码语言:javascript复制
[root@h101 ssdb]# pstree -a 10734
ssdb-server ssdb.conf
  ├─{ssdb-server}
  ├─{ssdb-server}
  ├─{ssdb-server}
  ├─{ssdb-server}
  ├─{ssdb-server}
  ├─{ssdb-server}
  ├─{ssdb-server}
  ├─{ssdb-server}
  ├─{ssdb-server}
  ├─{ssdb-server}
  ├─{ssdb-server}
  ├─{ssdb-server}
  └─{ssdb-server}
[root@h101 ssdb]# ps -Lf 10734 
UID        PID  PPID   LWP  C NLWP STIME TTY      STAT   TIME CMD
root     10734 10446 10734  0   14 20:29 pts/1    Sl     0:01 ./ssdb-server ssdb.conf
root     10734 10446 10735  0   14 20:29 pts/1    Sl     0:00 ./ssdb-server ssdb.conf
root     10734 10446 10736  0   14 20:29 pts/1    Sl     0:06 ./ssdb-server ssdb.conf
root     10734 10446 10737  0   14 20:29 pts/1    Sl     0:00 ./ssdb-server ssdb.conf
root     10734 10446 10738  0   14 20:29 pts/1    Sl     0:00 ./ssdb-server ssdb.conf
root     10734 10446 10739  0   14 20:29 pts/1    Sl     0:00 ./ssdb-server ssdb.conf
root     10734 10446 10740  0   14 20:29 pts/1    Sl     0:00 ./ssdb-server ssdb.conf
root     10734 10446 10741  0   14 20:29 pts/1    Sl     0:00 ./ssdb-server ssdb.conf
root     10734 10446 10742  0   14 20:29 pts/1    Sl     0:00 ./ssdb-server ssdb.conf
root     10734 10446 10743  0   14 20:29 pts/1    Sl     0:00 ./ssdb-server ssdb.conf
root     10734 10446 10744  0   14 20:29 pts/1    Sl     0:00 ./ssdb-server ssdb.conf
root     10734 10446 10745  0   14 20:29 pts/1    Sl     0:00 ./ssdb-server ssdb.conf
root     10734 10446 10746  0   14 20:29 pts/1    Sl     0:00 ./ssdb-server ssdb.conf
root     10734 10446 10747  0   14 20:29 pts/1    Sl     0:00 ./ssdb-server ssdb.conf
[root@h101 ssdb]# 

停止服务

代码语言:javascript复制
[root@h101 ssdb]# ./ssdb-server  ssdb.conf  -s stop 
ssdb-server 1.9.2
Copyright (c) 2012-2015 ssdb.io

[root@h101 ssdb]# ps faux | grep ssdb | grep -v grep 
[root@h101 ssdb]# 

后台运行

这种方式不会占用当前terminal,关闭当前terminal也不会导致服务退出

代码语言:javascript复制
[root@h101 ssdb]# ./ssdb-server  -d ssdb.conf 
ssdb-server 1.9.2
Copyright (c) 2012-2015 ssdb.io

[root@h101 ssdb]# ps faux | grep ssdb | grep -v grep 
root     10890  1.7  1.8 184860 36164 ?        Ssl  21:05   0:00 ./ssdb-server -d ssdb.conf
[root@h101 ssdb]# pstree 10890
ssdb-server───13*[{ssdb-server}]
[root@h101 ssdb]# 

0 人点赞