What happened to the consoles?

Tom H tomh0665 at gmail.com
Sun Mar 26 12:29:53 UTC 2017


On Sat, Mar 25, 2017 at 12:01 PM, MR ZenWiz <mrzenwiz at gmail.com> wrote:
> On Fri, Mar 24, 2017 at 3:50 AM, Tom H <tomh0665 at gmail.com> wrote:


>> Thanks. I'd assumed that "psg" was a home-brewed function.
>
> Confession - it is:
>
> psg ()
> {
> /bin/ps -ef | $grep -i "$*" | $grep -v $grep
> }
>
> Clearly I need to play with it and beef it up some.

Confession?! :)

It's good enough.

IIRC, the one that Ralph linked to gave the option of feeding "ps"
something other than "aux" and printed out headings.


> Never looked at pgrep or pidof. I need to brush up on my command line.

They're practical to get the pid of a process or check that a process
is running. Their output's different:

$ pgrep smtpd
1236
1239
1240
1241
1242
1243
1244

$ pidof smtpd
1244 1243 1242 1241 1240 1239 1236

On Debian-derived distros, pidof is part of sysvinit-utils whereas
it's provided by procps (like pgrep) elsewhere.


> As for digging in and finding out why the VTs were gone, I could have,
> but I needed a fast resolution and a reboot, while I always decry it
> as the Windows band-aid, seemed like an efficient if only immediate
> solution.

Rebooting's not a big deal. I reboot "my" Linux servers every 1 to 2
months. In my last permanent job, we used to reboot tens of 1000s of
systems, Linux and Solaris, every two months. The days of having
uptimes in years, whether on Windows, Solaris, or Linux, like we had
in the 90s and early 00s, are long gone. There are simply too many
updates and uprgades.

The fact that systemd-logind died must've been a fluke, possibly
related to your upgrade (IIRC, you'd run one) although it's not
supposed to be restarted.




More information about the ubuntu-users mailing list