Skip to content

Diagnostic

Current session info

To help to diagnose problem when using Bliss, some information can be retreived with the following functions:

  • <session_name> or current_session or feedback_info()
DEMO [2]: demo ⏎
 Out [2]: -------------------- BLISS session information -------------------------
                        DATE: 2024-10-08 16:31:05.629613
                  PLATERFORM: Linux-4.19.0-14-amd64-x86_64-with-glibc2.28
          PLATERFORM VERSION: #1 SMP Debian 4.19.171-2 (2021-01-30)
                        HOST: lid421
                  OPEN FILES: 23 (max=1024)
           CONDA_DEFAULT_ENV: bliss
                        REPO: /users/blissadm/local/bliss.git/
               BLISS release: 2.2.dev0
                     SESSION: demo
                  THEME MODE: dark
              user_scan_meta: ScanMeta:
           { 'instrument': {'@NX_class': {'@NX_class': 'NXinstrument'}},
            'technique': {'@NX_class': {'@NX_class': 'NXcollection'}}}
          ------------------------------------------------------------------------


DEMO [1]: from bliss import current_session
DEMO [2]: current_session ⏎
 Out [2]: -------------------- BLISS session information -------------------------
          (idem)
...

Open files

Here are functions to help to investigate issues due to open file descriptors (files, socket, pipe, etc.).

  • get_open_fds_count(): Return the number of open file descriptor
  • get_open_fds_list(): Return the list of open file descriptors
  • get_max_open_fds(): Return soft and hard limits of number of open file descriptors
DEMO [5]: from bliss.common.utils import get_open_fds_list, get_max_open_fds, get_open_fds_count

DEMO [6]: print("\n".join(get_open_fds_list()))
/dev/pts/11
/dev/pts/11
/dev/pts/11
/dev/urandom
anon_inode:[eventpoll]
anon_inode:[eventfd]
pipe:[13586769]
socket:[13589524]
pipe:[13586769]
pipe:[13586770]
socket:[13586778]
socket:[13586779]
...

DEMO [7]: get_max_open_fds()
 Out [7]: (1024, 1048576)

DEMO [8]: get_open_fds_count()
 Out [8]: 26