Networking

Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.

Applications

Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.

Data

Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.

Monitoring

Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Commands & Shells

Faking the Uptime in Linux

Submitted by on May 4, 2015 – 10:05 pm

If, for whatever reason, you need to fake the Linux server uptime, there is a hacked kernel module you can use. The instructions are below.

cd /tmp ; wget https://github.com/dkorunic/uptime_hack/archive/master.zip ; unzip master.zip ; cd uptime_hack-master ; make; insmod uptime_hack.ko uptime=0; echo 1020210 > /sys/module/uptime_hack/parameters/uptime ; echo y > /sys/module/uptime_hack/parameters/hideme ; uptime

Replace the “1020210” string with a number where 1 is approximately 1001 seconds, thus 1020210 means uptime of about 11830 days.

Print Friendly, PDF & Email

No Comment »

1 Pingbacks »

Leave a Reply

%d bloggers like this: