Author: Tomáš Homola
Date: 11.03.2022
Programming language: C
Pomocou Makefile
make
./hinfosvc PORT_NUMBER
Implementation of a server communicating via the HTTP protocol, which provides various information about the system. The server listens on the specified port and, according to the URL, will return the requested information with text/plain responses.
The server can be terminated with CTRL+C and can handle the following 3 types of requests sent by the client to the server with the GET command
Communication between the server and the client is possible using a web browser and wget and curl tools.
Get domain name
GET http://servername:12345/hostname
merlin.fit.vutbr.cz
Get CPU informations
GET http://servername:12345/cpu-name
Intel(R) Xeon(R) CPU E5-2640 0 @ 2.50GHz
Current CPU load
GET http://servername:12345/load
32%