Record server uptime in text file

Create a shell script and execute that shell script.