Skip to content
Snippets Groups Projects
Commit d86384f8 authored by Anjan Chanda's avatar Anjan Chanda
Browse files

update README

parent 4fc344ac
Branches master
Tags
No related merge requests found
......@@ -39,6 +39,7 @@ Sample '/etc/config/hosts' file -
config global 'global'
option enabled '1'
option history '1'
option history_reboot_persistent '1'
option history_file '/etc/hosts_history.json'
option history_timeout '604800'
......@@ -54,6 +55,7 @@ Section | Name | Type | Required | Default | Description
global | - | - | - | - | - |
" |enabled | boolean | no | 1 | When set to 0, disables hostmngr. The daemon will however keep running, and can be re-enabled by setting to 1. |
" |history| boolean | no | 1 | When set to 0, disables history. |
" |history_reboot_persistent| boolean | no | 1 | When set to 0, history entries are not persisted across reboots. |
" |history_file | string | no | '/etc/hosts_history.json' | Specifies history file name. History records are stored in this file in JSON format. |
" |history_timeout | integer | no | 604800 | Specifies the duration in seconds a _non-live_ history record will be kept in history. |
interface | - | - | - | - | - |
......@@ -81,26 +83,29 @@ root@eagle-44d43771baa0:~# ubus call hosts show
{
"hosts": [
{
"macaddress": "00:02:02:aa:bb:cc",
"macaddr": "00:02:02:aa:bb:cc",
"hostname": "acx-laptop",
"ipv4addr": "192.168.1.160",
"active": true,
"active_last_change": "2023-05-30T21:31:57",
"ipaddr": "192.168.1.160",
"address_source": "DHCP",
"lease_time_remaining": 3369,
"iswifi": false,
"interface_type": "Ethernet",
"is1905": false,
"state": "reachable",
"link_macaddr": "",
"ndm_state": "reachable",
"num_tcp": 0,
"num_udp": 10,
"interface": "eth3",
"active_connections": 10,
"device": "eth3",
"network": "lan",
"ipv4_address": [
{
"ip": "192.168.1.160"
}
"ip": "192.168.1.160"
],
"ipv6_address": [
],
"wan_stats": {
"stats": {
"tx_packets": 70,
"tx_bytes": 7323,
"rx_packets": 61,
......@@ -119,13 +124,13 @@ root@eagle-44d43771baa0:~# ubus call hosts history
"history": [
{
"idx": 4,
"macaddress": "00:02:02:aa:bb:cc",
"macaddr": "00:02:02:aa:bb:cc",
"hostname": "acx-laptop",
"first_seen": "2023-05-30T21:30:38",
"last_seen": "2023-05-30T21:31:57",
"alive": true,
"iswifi": false,
"wan_stats": {
"stats": {
"tx_packets": 0,
"tx_bytes": 0,
"rx_packets": 0,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment