Movatterモバイル変換


[0]ホーム

URL:


man7.org > Linux >man-pages

Linux/UNIX system programming training


__pmServerNotifyServiceManagerReady(3) — Linux manual page

NAME |C SYNOPSIS |CAVEAT |DESCRIPTION |DIAGNOSTICS |RETURN CODE |COLOPHON

PMSERVER...AGERREADY(3)  Library Functions ManualPMSERVER...AGERREADY(3)

NAME        top

__pmServerNotifyServiceManagerReady,__pmServerNotifyServiceManagerStopping- notify service start and       stop

C SYNOPSIS        top

#include "pmapi.h"#include "libpcp.h"int __pmServerNotifyServiceManagerReady(pid_tmainpid);int __pmServerNotifyServiceManagerStopping(pid_tmainpid);cc ... -lpcp

CAVEAT        top

       This  documentation  is intended for internal Performance Co-Pilot       (PCP) developer use.       These interfaces are not part of the PCP APIs that are  guaranteed       to  remain  fixed  across  releases, and they may not work, or may       provide different semantics at some point in the future.

DESCRIPTION        top

       Within the libraries and applications of the Performance  Co-Pilot       (PCP)  these  routines provide a convenient and portable interface       to service manager APIs, such assd_notify(3).       PCP service daemons  should  call__pmServerNotifyServiceManager‐Readyimmediately prior to entering their main loop, regardless of       whether  or  not they have forked or daemonised.  This will notify       the service manager (if any, depending on the platform)  that  the       daemon  service  has  started,  and  that  the  main process to be       tracked ismainpid.       Similarly when shutting down, service daemons  should  call__pm‐ServerNotifyServiceManagerStoppingto  notify the service manager       (if any) that the tracked process of the service has returned from       it's main loop and is about to shut down.       These routines are intended to be portable and thus no conditional       code should be needed for any service daemon on any platform.

DIAGNOSTICS        top

       These functions will print diagnostics to  thestderrstream  ifpmDebugOptions.servicesis set.

RETURN CODE        top

       If successful,__pmServerNotifyServiceManagerReadyreturns a posi‐       tive integer that depends on the platform service manager.  In the       case  ofsystemd(1), the return code is fromsd_notify(3).  If the       platform supportssystemd(1)  but  theNOTIFY_SOCKETenvironment       variable  is  not set (as may be the case if the server program is       started manually rather than bysystemd(1)), the return code  will       bePM_ERR_GENERICwhich will normally be ignored but a diagnostic       will be printed ifpmDebugOptions.servicesis set.   On  platforms       that  have no service manager, the return code will bePM_ERR_NYI.       For backward compatibility on these  platforms,  the  return  code       should be ignored.

COLOPHON        top

       This  page is part of thePCP (Performance Co-Pilot) project.  In‐       formation about the project can be found at  ⟨http://www.pcp.io/⟩.       If  you  have  a  bug  report  for  this  manual  page, send it to       pcp@groups.io.  This page was obtained from the project's upstream       Git repository ⟨https://github.com/performancecopilot/pcp.git⟩  on       2025-08-11.   (At  that  time,  the date of the most recent commit       that was found in the repository was 2025-08-11.)  If you discover       any rendering problems in this HTML version of the  page,  or  you       believe  there is a better or more up-to-date source for the page,       or you have corrections or improvements to the information in this       COLOPHON (which isnot part of the original manual page),  send  a       mail to man-pages@man7.orgPerformance Co-Pilot               PCPPMSERVER...AGERREADY(3)

Pages that refer to this page:pmlogger(1)



HTML rendering created 2025-09-06 byMichael Kerrisk, author ofThe Linux Programming Interface.

For details of in-depthLinux/UNIX system programming training courses that I teach, lookhere.

Hosting byjambit GmbH.

Cover of TLPI


[8]ページ先頭

©2009-2025 Movatter.jp