startsrc -s writesrv &
netstat -an | grep 1334
# netstat -an | grep 1334
tcp4 0 0 *.1334 *.* LISTEN
stopsrc -f -s writesrv
smit
Processes & Subsystems
Subsystems
Stop Subsystem
Stop a Single Subsystem
* Subsystem PROCESS ID
ESC+4
选中
4718642 writesrv
Stop TYPE forced
运行端口检测命令
# netstat -an | grep 1334
没有输出,停止完成
开机时不自动启动
vi /etc/inittab
#writesrv:23456789:wait:/usr/bin/startsrc -swritesrv(不管用)
/etc/inittab最后以行增加停止writesrv 命令
writesrv2:2:once:/usr/bin/stopsrc -f -s writesrv >/dev/null 2>&1 管用
# netstat -an | grep 1334
tcp4 0 0 *.1334 *.* LISTEN
# ps -ef | grep write
root 4718642 5963918 0 May 23 - 0:00 /usr/sbin/writesrv
root 9044370 27525608 0 14:13:22 pts/0 0:00 grep write
# kill -9 4718642
# netstat -an | grep 1334
#