last -30 -a
-num This is a count telling last how many lines to show. -a Display the hostname in the last column. Useful in combination with the next flag.