📅  最后修改于: 2023-12-03 14:40:41.155000             🧑  作者: Mango
This script provides status information on the ISC DHCP Server running on Debian 10. The script returns a markdown formatted output with a code snippet that provides the status of the DHCP server.
To use the script, simply run it with the following command:
./debian10-isc-dhcp-status.sh
This will provide you with the status information of the ISC DHCP Server on your Debian 10 system.
## Debian 10 ISC DHCP Server Status
systemctl status isc-dhcp-server.service
● isc-dhcp-server.service - ISC DHCP IPv4 server Loaded: loaded (/lib/systemd/system/isc-dhcp-server.service; enabled; vendor preset: enabled) Active: active (running) since Sun 2021-08-22 13:40:33 UTC; 3h 58min ago Docs: man:dhcpd(8) Main PID: 1166 (dhcpd) Tasks: 2 (limit: 10068) Memory: 7.1M CGroup: /system.slice/isc-dhcp-server.service └─1166 dhcpd -f -q -4 -pf /run/dhcp-server/dhcpd.pid -cf /etc/dhcp/dhcpd.conf
Aug 22 13:40:33 hostname systemd[1]: Starting ISC DHCP IPv4 server... Aug 22 13:40:33 hostname dhcpd[1166]: Internet Systems Consortium DHCP Server 4.4.1 Aug 22 13:40:33 hostname dhcpd[1166]: Copyright 2004-2018 Internet Systems Consortium. Aug 22 13:40:33 hostname dhcpd[1166]: All rights reserved. Aug 22 13:40:33 hostname dhcpd[1166]: For info, please visit https://www.isc.org/software/dhcp/ Aug 22 13:40:33 hostname dhcpd[1166]: Wrote 0 leases to leases file. Aug 22 13:40:33 hostname systemd[1]: Started ISC DHCP IPv4 server.
The code snippet above shows the status of the ISC DHCP Server as returned by the systemctl status isc-dhcp-server.service
command. The output includes information such as the server's main PID, memory usage, and log messages from its startup. This information can be used to diagnose any issues with the DHCP server and ensure that it is running smoothly.
The Debian 10 ISC DHCP Server Status script provides a convenient way to check the status of the DHCP server running on your system. By using this script, you can ensure that your DHCP server is up and running, as well as diagnose any issues that may arise.