• Pesky message: cannot stat /var/run/utmp. Please "unset watch".

    From Robert Heller@3:633/10 to All on Thursday, July 23, 2026 15:20:01
    On a fresh install of trixie (Debian 13), I am getting this message. Where is it coming from?

    The message is:

    cannot stat /var/run/utmp. Please "unset watch".

    --
    Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
    Deepwoods Software -- Custom Software Services
    http://www.deepsoft.com/ -- Linux Administration Services
    heller@deepsoft.com -- Webhosting Services


    --- PyGate Linux v1.5.18
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Greg Wooledge@3:633/10 to All on Thursday, July 23, 2026 16:20:01
    On Thu, Jul 23, 2026 at 09:15:05 -0400, Robert Heller wrote:
    On a fresh install of trixie (Debian 13), I am getting this message. Where is
    it coming from?

    The message is:

    cannot stat /var/run/utmp. Please "unset watch".

    It would help enormously if you told us what command you ran to produce
    the message.

    That said, the utmp file is no longer supported, partly because its
    format is incompatible with 64-bit time_t.

    https://www.debian.org/releases/stable/release-notes/issues.en.html#the-last-lastb-and-lastlog-commands-have-been-replaced

    --- PyGate Linux v1.5.18
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Robert Heller@3:633/10 to All on Thursday, July 23, 2026 18:40:02
    At Thu, 23 Jul 2026 10:12:31 -0400 Greg Wooledge <greg@wooledge.org> wrote:


    On Thu, Jul 23, 2026 at 09:15:05 -0400, Robert Heller wrote:
    On a fresh install of trixie (Debian 13), I am getting this message. Where is
    it coming from?

    The message is:

    cannot stat /var/run/utmp. Please "unset watch".

    It would help enormously if you told us what command you ran to produce
    the message.

    I'm not running any partitular command. This message occurs at every shell prompt. I do have a set prompt in my .cshrc (I am using tcsh as my shell):

    #
    # set prompt
    #
    set me = `whoami`
    if ("$me" != "root") set prompt="`hostname`% "
    if ("$me" = "root") set prompt="`hostname`# "
    #



    That said, the utmp file is no longer supported, partly because its
    format is incompatible with 64-bit time_t.

    https://www.debian.org/releases/stable/release-notes/issues.en.html#the-last-lastb-and-lastlog-commands-have-been-replaced




    --
    Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
    Deepwoods Software -- Custom Software Services
    http://www.deepsoft.com/ -- Linux Administration Services
    heller@deepsoft.com -- Webhosting Services


    --- PyGate Linux v1.5.18
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From tomas@3:633/10 to All on Thursday, July 23, 2026 18:50:01
    On Thu, Jul 23, 2026 at 12:33:32PM -0400, Robert Heller wrote:
    At Thu, 23 Jul 2026 10:12:31 -0400 Greg Wooledge <greg@wooledge.org> wrote:


    On Thu, Jul 23, 2026 at 09:15:05 -0400, Robert Heller wrote:
    On a fresh install of trixie (Debian 13), I am getting this message. Where is
    it coming from?

    The message is:

    cannot stat /var/run/utmp. Please "unset watch".

    It would help enormously if you told us what command you ran to produce
    the message.

    I'm not running any partitular command. This message occurs at every shell prompt. I do have a set prompt in my .cshrc (I am using tcsh as my shell):

    #
    # set prompt
    #
    set me = `whoami`
    if ("$me" != "root") set prompt="`hostname`% "
    if ("$me" == "root") set prompt="`hostname`# "
    #
    - Does it happen if you don't set your prompt?
    - does it happen if you invoke hostname directly?
    - does it happen (improbable) if you invoke whoami directly?
    This would help to bisect (trisect?) the problem.
    Cheers
    --
    tom s


    --- PyGate Linux v1.5.18
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Klaus Singvogel@3:633/10 to All on Thursday, July 23, 2026 19:30:01
    Robert Heller wrote:
    On a fresh install of trixie (Debian 13), I am getting this message. Where is
    it coming from?

    The message is:

    cannot stat /var/run/utmp. Please "unset watch".

    This message is triggered by the removal of /var/run/utmp and the switch to systemd as the replacement.

    The previous utmp format was not 64-bit compatible. With the system moving to a 64-bit time representation, Linux can avoid the Y2038 problem that would occur if it continued relying on a 32-bit time measurement.

    Reference: https://github.com/thkukuk/wtmpdb/blob/main/README.md

    As a (rough, but incomplete) replacement, you can use:
    loginctl list-sessions --no-legend

    You should disable setting of watch in your .login or .cshrc or .tcshrc

    Best regards,
    Klaus.
    --
    Klaus Singvogel
    GnuPG-Key-ID: 1024R/5068792D 1994-06-27

    --- PyGate Linux v1.5.18
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Robert Heller@3:633/10 to All on Thursday, July 23, 2026 20:30:01
    At Thu, 23 Jul 2026 18:41:49 +0200 <tomas@tuxteam.de> wrote:


    On Thu, Jul 23, 2026 at 12:33:32PM -0400, Robert Heller wrote:
    At Thu, 23 Jul 2026 10:12:31 -0400 Greg Wooledge <greg@wooledge.org> wrote:


    On Thu, Jul 23, 2026 at 09:15:05 -0400, Robert Heller wrote:
    On a fresh install of trixie (Debian 13), I am getting this message. Where is
    it coming from?

    The message is:

    cannot stat /var/run/utmp. Please "unset watch".

    It would help enormously if you told us what command you ran to produce the message.

    I'm not running any partitular command. This message occurs at every shell prompt. I do have a set prompt in my .cshrc (I am using tcsh as my shell):

    #
    # set prompt
    #
    set me = `whoami`
    if ("$me" != "root") set prompt="`hostname`% "
    if ("$me" = "root") set prompt="`hostname`# "
    #

    - Does it happen if you don't set your prompt?
    - does it happen if you invoke hostname directly?
    - does it happen (improbable) if you invoke whoami directly?

    I took out the 'set prompt=' commands from my .cshrc file, it still happens.
    It does NOT happen if I use either of the whoami and hostname commands,


    This would help to bisect (trisect?) the problem.

    Cheers

    --
    Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
    Deepwoods Software -- Custom Software Services
    http://www.deepsoft.com/ -- Linux Administration Services
    heller@deepsoft.com -- Webhosting Services


    --- PyGate Linux v1.5.18
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From tomas@3:633/10 to All on Thursday, July 23, 2026 20:50:02
    On Thu, Jul 23, 2026 at 02:21:22PM -0400, Robert Heller wrote:
    At Thu, 23 Jul 2026 18:41:49 +0200 <tomas@tuxteam.de> wrote:


    On Thu, Jul 23, 2026 at 12:33:32PM -0400, Robert Heller wrote:
    At Thu, 23 Jul 2026 10:12:31 -0400 Greg Wooledge <greg@wooledge.org> wrote:


    On Thu, Jul 23, 2026 at 09:15:05 -0400, Robert Heller wrote:
    On a fresh install of trixie (Debian 13), I am getting this message. Where is
    it coming from?

    The message is:

    cannot stat /var/run/utmp. Please "unset watch".

    It would help enormously if you told us what command you ran to produce the message.

    I'm not running any partitular command. This message occurs at every shell
    prompt. I do have a set prompt in my .cshrc (I am using tcsh as my shell):

    #
    # set prompt
    #
    set me = `whoami`
    if ("$me" != "root") set prompt="`hostname`% "
    if ("$me" == "root") set prompt="`hostname`# "
    #

    - Does it happen if you don't set your prompt?
    - does it happen if you invoke hostname directly?
    - does it happen (improbable) if you invoke whoami directly?

    I took out the 'set prompt=' commands from my .cshrc file, it still happens. It does NOT happen if I use either of the whoami and hostname commands,
    Interesting: elsewhere in this thread "set watch" is named as the
    most probable culprit, which sounds plausible to me. Probably it's
    elsewhere in your .cshrc.
    Cheers
    --
    t


    --- PyGate Linux v1.5.18
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Robert Heller@3:633/10 to All on Thursday, July 23, 2026 21:00:01
    At Thu, 23 Jul 2026 20:41:15 +0200 tomas@tuxteam.de wrote:


    On Thu, Jul 23, 2026 at 02:21:22PM -0400, Robert Heller wrote:
    At Thu, 23 Jul 2026 18:41:49 +0200 <tomas@tuxteam.de> wrote:


    On Thu, Jul 23, 2026 at 12:33:32PM -0400, Robert Heller wrote:
    At Thu, 23 Jul 2026 10:12:31 -0400 Greg Wooledge <greg@wooledge.org> wrote:


    On Thu, Jul 23, 2026 at 09:15:05 -0400, Robert Heller wrote:
    On a fresh install of trixie (Debian 13), I am getting this message. Where is
    it coming from?

    The message is:

    cannot stat /var/run/utmp. Please "unset watch".

    It would help enormously if you told us what command you ran to produce
    the message.

    I'm not running any partitular command. This message occurs at every shell
    prompt. I do have a set prompt in my .cshrc (I am using tcsh as my shell):

    #
    # set prompt
    #
    set me = `whoami`
    if ("$me" != "root") set prompt="`hostname`% "
    if ("$me" = "root") set prompt="`hostname`# "
    #

    - Does it happen if you don't set your prompt?
    - does it happen if you invoke hostname directly?
    - does it happen (improbable) if you invoke whoami directly?

    I took out the 'set prompt=' commands from my .cshrc file, it still happens.
    It does NOT happen if I use either of the whoami and hostname commands,

    Interesting: elsewhere in this thread "set watch" is named as the
    most probable culprit, which sounds plausible to me. Probably it's
    elsewhere in your .cshrc.


    Yes it was. My .cshrc file has moved from machine to machine for decades, occasionally gaining a line or two, And I probably inherieted it from somewhere in the depths of time... It almost certainly predates Linux itself (from the days I was using various UNIX Workstations,,,)

    Cheers

    --
    Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
    Deepwoods Software -- Custom Software Services
    http://www.deepsoft.com/ -- Linux Administration Services
    heller@deepsoft.com -- Webhosting Services


    --- PyGate Linux v1.5.18
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)