Silk Web Hosting: Logs

Modified

Web server request and error logs are stored for at least 100 days.

Silkv2 servers

Sites on silkv2 servers have a corresponding *-logs/ directory for each site root directory (e.g., ~/www-root/ has a corresponding ~/www-logs/). Inside, you will find access-log and error-log files.

Silkv3 servers

Sites on silkv3 servers store their logs in a searchable database. You can query logs using the silk command. You can see full command-line usage instructions by typing silk site <myhostname> logs --help.

Request logs

# See access logs from the last 24 hours in Apache common log format
$ silk site mynetid.w3.uvm.edu logs 
[...]

# See access logs from the last 24 hours in JSON format
$ silk site mynetid.w3.uvm.edu logs --format=json
[...]

# See access logs from a specific starting time to now
$ silk site mynetid.w3.uvm.edu logs --start-time="2024-06-01 10:14:00"
[...]
Querying JSON

JSON output can be queried in arbitrary ways using jq. For example, to see a list of unique browser user agents connecting to your site, you could type:

$ silk site mynetid.w3.uvm.edu logs --format=json | jq -s 'map([.user_agent]) | flatten | unique'

To see how many requests each remote client has sent to your site, you could type:

$ silk site mynetid.w3.uvm.edu logs --format=json \
| jq -s 'group_by(.remote_addr) '\
'| map({remote_addr: .[0].remote_addr, count: (map(.request_id) | length)})'

See the jq manual for full usage information.

Error logs

The above options work for error logs, too. Error log entries generally contain a unique ID corresponding to an entry in the request log.

$ silk site mynetid.w3.uvm.edu logs --type=error --start-time="2024-06-01 10:14:00"