Nuovo file di statistiche creato ogni 20 secondi in /var/log/com.apple.launchd.peruser.94?

1

La mia macchina consuma tutta la CPU per una o due ore durante l'elaborazione di alcune systemstats. Finora ho risolto il problema pulendo regolarmente l'enorme quantità di dati in /private/var/db/systemstats/

Ora ho notato che ottengo tonnellate di file .stats creati in /var/log/com.apple.launchd.peruser.94 . Un nuovo file viene creato circa ogni 20 secondi. Un elenco assomiglia a questo:

bash-3.2# ls -lt
total 136
-rw-------  1 _teamsserver  wheel    268 May 14 09:38 3FCE2CE8-4834-4A2E-ADBA-47BCFCC92A9B.launchd.events.rt0Fz3.stats
-rw-r--r--  1 _teamsserver  wheel  16289 May 14 09:38 launchd-shutdown._teamsserver.log
-rw-r--r--  1 _teamsserver  wheel  16487 May 14 09:38 launchd-shutdown._teamsserver.log.1
-rw-------  1 _teamsserver  wheel    268 May 14 09:37 3FCE2CE8-4834-4A2E-ADBA-47BCFCC92A9B.launchd.events.gJFx9e.stats
-rw-------  1 _teamsserver  wheel    268 May 14 09:37 3FCE2CE8-4834-4A2E-ADBA-47BCFCC92A9B.launchd.events.dE601a.stats
-rw-------  1 _teamsserver  wheel    268 May 14 09:37 3FCE2CE8-4834-4A2E-ADBA-47BCFCC92A9B.launchd.events.v3CH6Y.stats
-rw-------  1 _teamsserver  wheel    268 May 14 09:37 3FCE2CE8-4834-4A2E-ADBA-47BCFCC92A9B.launchd.events.89LBZP.stats
-rw-------  1 _teamsserver  wheel    268 May 14 09:36 3FCE2CE8-4834-4A2E-ADBA-47BCFCC92A9B.launchd.events.CO28zM.stats
-rw-------  1 _teamsserver  wheel    268 May 14 09:36 3FCE2CE8-4834-4A2E-ADBA-47BCFCC92A9B.launchd.events.FDGR7H.stats
-rw-------  1 _teamsserver  wheel    268 May 14 09:35 3FCE2CE8-4834-4A2E-ADBA-47BCFCC92A9B.launchd.events.1SJEPv.stats
bash-3.2# 

Che cosa sta causando questo?

Utilizzo Mavericks 10.9.5 con OSX Server 3.1.2.

EDIT:

L'esecuzione di questo ps -u _teamsserver produce questo risultato:

  UID   PID TTY           TIME CMD
   94   258 ??       597:58.63 /usr/bin/python /Applications/Server.app/Contents/ServerRoot/usr/bin/xpostgres -D /Library/Server/Wiki/Database.xpg/Cluster.pg -c log_line_prefix=%t -c log_lock_waits=on -c log_statement=ddl -c logging_collector=on -c max_connections=500 -c unix_socket_directory=/Library/Server/Wiki/PostgresSocket -c unix_socket_group=_teamsserver -c unix_socket_permissions=0770 -c log_connections=on -c listen_addresses= -c log_directory=/Library/Server/Wiki/Logs -c log_filename=postgres-%a.log -c log_rotation_age=1440 -c log_truncate_on_rotation=on
   94   262 ??         4:45.21 /Applications/Server.app/Contents/ServerRoot/usr/bin/postgres_real -D /Library/Server/Wiki/Database.xpg/Cluster.pg -c log_line_prefix=%t -c log_lock_waits=on -c log_statement=ddl -c logging_collector=on -c max_connections=500 -c unix_socket_directory=/Library/Server/Wiki/PostgresSocket -c unix_socket_group=_teamsserver -c unix_socket_permissions=0770 -c log_connections=on -c listen_addresses= -c log_directory=/Library/Server/Wiki/Logs -c log_filename=postgres-%a.log -c log_rotation_age=1440 -c log_truncate_on_rotation=on
   94   263 ??         1:03.79 /Applications/Server.app/Contents/ServerRoot/usr/bin/pg_receivexlog -h /Library/Server/Wiki/PostgresSocket --no-password --directory /Library/Server/Wiki/Database.xpg/backup --verbose
   94   264 ??         0:25.33 postgres: logger process                                 
   94   266 ??         0:53.21 postgres: checkpointer process                                 
   94   267 ??         1:20.23 postgres: writer process                                 
   94   268 ??         1:15.03 postgres: wal writer process                                 
   94   269 ??         2:55.69 postgres: autovacuum launcher process                                 
   94   270 ??         0:24.03 postgres: archiver process   last was 0000000100000000000000E8                              
   94   271 ??         7:29.90 postgres: stats collector process                                 
   94   279 ??        23:24.36 /Applications/Server.app/Contents/ServerRoot/usr/sbin/collabd
   94   281 ??         0:42.81 postgres: collab collab [local] idle                              
   94   292 ??         0:00.00 postgres: collab collab [local] idle                              
   94   309 ??         2:04.84 postgres: wal sender process _teamsserver [local] streaming 0/E9B06448                              
   94 38417 ??         0:01.39 /Applications/Server.app/Contents/ServerRoot/usr/bin/ruby notifications.rb

A volte appare un'altra linea che corrisponde all'intervallo di 20 secondi:

94 44867 ??         0:00.01 /sbin/launchd

EDIT:

Ho iniziato launchctl e ho esaminato alcuni comandi e output. Il comando list ha mostrato questo:

...
263 -   0x7f96d2d27200.anonymous.pg_receivexlog
258 -   0x7f96d2c68620.anonymous.Python
-   0   com.apple.launchd.peruser.94
215 -   0x7f96d2d19890.anonymous.postgres_real
216 -   0x7f96d2d194c0.anonymous.pg_receivexlog
...

L'elenco della voce peruser.94 più volte fornisce questo: (una volta con una voce PID, una volta non)

launchd% list com.apple.launchd.peruser.94
{
    "Label" = "com.apple.launchd.peruser.94";
    "LimitLoadToSessionType" = "System";
    "OnDemand" = true;
    "LastExitStatus" = 0;
    "TimeOut" = 30;
    "Program" = "/sbin/launchd";
    "EnableTransactions" = true;
    "MachServices" = {
        "com.apple.launchd.peruser.94" = mach-port-object;
    };
};
launchd% list com.apple.launchd.peruser.94
{
    "Label" = "com.apple.launchd.peruser.94";
    "LimitLoadToSessionType" = "System";
    "OnDemand" = true;
    "LastExitStatus" = 0;
    "PID" = 45918;
    "TimeOut" = 30;
    "Program" = "/sbin/launchd";
    "EnableTransactions" = true;
    "MachServices" = {
        "com.apple.launchd.peruser.94" = mach-port-object;
    };
};

Suppongo che dovrei essere in grado di seguire il percorso lungo "MachServices" ecc. Passerò un po 'di tempo a cercare nella documentazione. Qualcuno può darmi qualche suggerimento su dove questo potrebbe portare? Come posso scoprire cosa questo cerca di fare?

EDIT:

Ho cercato tutte le voci in /Applications/Server.app/Contents/ServerRoot/System/Library/LaunchDaemons che contengono "_teamsserver":

bash-3.2# pwd
/Applications/Server.app/Contents/ServerRoot/System/Library/LaunchDaemons
bash-3.2# grep -i teams *
com.apple.collabd.expire.plist: <string>_teamsserver</string>
com.apple.collabd.expire.plist: <string>_teamsserver</string>
com.apple.collabd.preview.plist:    <string>_teamsserver</string>
com.apple.collabd.preview.plist:    <string>_teamsserver</string>
com.apple.collabd.quicklook.plist:    <string>_teamsserver</string>
com.apple.collabd.quicklook.plist:    <string>_teamsserver</string>
com.apple.collabd.stats.plist:  <string>_teamsserver</string>
com.apple.collabd.stats.plist:  <string>_teamsserver</string>
com.apple.xcs.stats.plist:  <string>_teamsserver</string>
com.apple.xcs.stats.plist:  <string>_teamsserver</string>
com.apple.xcsbuildd.plist:  <string>_teamsserver</string>
com.apple.xcsbuildd.plist:  <string>_teamsserver</string>
com.apple.xcsdevicesnifferd.plist:  <string>_teamsserver</string>
com.apple.xcsdevicesnifferd.plist:  <string>_teamsserver</string>
bash-3.2# 
    
posta Rainer Schwarze 14.05.2015 - 09:41
fonte

0 risposte

Leggi altre domande sui tag