$ netstat -nlpt | grep 3000 (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) tcp6 0 0 :::3000 :::* LISTEN -
如果出现启动错误,比如下面的错误:
1 2 3 4 5 6 7 8 9 10 11 12 13
$ sudo /bin/systemctl status grafana-server.service ● grafana-server.service - Grafana instance Loaded: loaded (/usr/lib/systemd/system/grafana-server.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Sat 2024-08-31 11:26:09 CST; 3min 11s ago Docs: http://docs.grafana.org Process: 10315 ExecStart=/usr/share/grafana/bin/grafana server --config=${CONF_FILE} --pidfile=${PID_FILE_DIR}/grafana-server.pid --packaging=deb cfg:default.paths.logs=${LOG_DIR} cfg:default.paths.data=${DATA_DIR} cfg:default.paths.plugins=${PLUGINS_DIR} cfg:default.paths.provisioning=${PROVISIONING_CFG_DIR} (code Main PID: 10315 (code=exited, status=1/FAILURE)
Aug 31 11:26:09 VM-0-9-ubuntu systemd[1]: grafana-server.service: Service hold-off time over, scheduling restart. Aug 31 11:26:09 VM-0-9-ubuntu systemd[1]: grafana-server.service: Scheduled restart job, restart counter is at 19. Aug 31 11:26:09 VM-0-9-ubuntu systemd[1]: Stopped Grafana instance. Aug 31 11:26:09 VM-0-9-ubuntu systemd[1]: grafana-server.service: Start request repeated too quickly. Aug 31 11:26:09 VM-0-9-ubuntu systemd[1]: grafana-server.service: Failed with result 'exit-code'. Aug 31 11:26:09 VM-0-9-ubuntu systemd[1]: Failed to start Grafana instance.