home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / x / volume17 / xetat / part02 < prev    next >
Encoding:
Text File  |  1992-03-17  |  30.2 KB  |  946 lines

  1. Newsgroups: comp.sources.x
  2. Path: uunet!zaphod.mps.ohio-state.edu!mips!msi!dcmartin
  3. From: pierre%system@uunet.UU.NET (Pierre Ficheux)
  4. Subject: v17i020: xetat : graphical system activity reporter, Part02/02
  5. Message-ID: <1992Mar18.213656.15962@msi.com>
  6. Originator: dcmartin@fascet
  7. Sender: dcmartin@msi.com (David C. Martin - Moderator)
  8. Organization: Molecular Simulations, Inc.
  9. References: <csx-17i019-xetat@uunet.UU.NET>
  10. Date: Wed, 18 Mar 1992 21:36:56 GMT
  11. Approved: dcmartin@msi.com
  12.  
  13. Submitted-by: pierre%system@uunet.UU.NET (Pierre Ficheux)
  14. Posting-number: Volume 17, Issue 20
  15. Archive-name: xetat/part02
  16.  
  17. #!/bin/sh
  18. # This is part 02 of a multipart archive
  19. # ============= xetat.c ==============
  20. if test -f 'xetat.c' -a X"$1" != X"-c"; then
  21.     echo 'x - skipping xetat.c (File already exists)'
  22. else
  23. echo 'x - extracting xetat.c (Text)'
  24. sed 's/^X//' << 'SHAR_EOF' > 'xetat.c' &&
  25. /*
  26. X * xetat - graphical system activity reporter
  27. X *
  28. X * Copyright 1991 Lectra Systemes
  29. X *
  30. X * Permission to use, copy, modify, and distribute this software and its
  31. X * documentation for any purpose and without fee is hereby granted, provided
  32. X * that the above copyright notice appear in all copies and that both that
  33. X * copyright notice and this permission notice appear in supporting
  34. X * documentation, and that the name of Lectra Systemes not be used in advertising or
  35. X * publicity pertaining to distribution of the software without specific,
  36. X * written prior permission.  Lectra Systemes makes no representations about the
  37. X * suitability of this software for any purpose.  It is provided "as is"
  38. X * without express or implied warranty.
  39. X *
  40. X * Auteur : Pierre FICHEUX     Lectra Systemes R & D
  41. X *
  42. X */
  43. static char sccsid[] = "@(#)xetat.c    1.1 3/10/92";
  44. X
  45. /*
  46. X * Partie principale
  47. X */
  48. X
  49. #include <stdio.h>
  50. #include <sys/types.h>
  51. #include <sys/sysinfo.h>
  52. #include <string.h>
  53. X
  54. /* 
  55. X * Fichiers standards du toolkit Xt
  56. X */
  57. #include <X11/IntrinsicP.h>
  58. #include <X11/StringDefs.h>
  59. #include <X11/XawMisc.h>
  60. #include <X11/Form.h>
  61. #include <X11/Label.h>
  62. #include <X11/Shell.h>
  63. #include <X11/List.h>
  64. #include <X11/Paned.h>
  65. #include <X11/Xaw/StripChart.h>
  66. #include <X11/Viewport.h>
  67. #include <X11/Xmu.h>
  68. #include <X11/Xmu/SysUtil.h>
  69. X
  70. /*
  71. X * Public include files for widgets used in this file.
  72. X */
  73. #ifdef X11R3
  74. #include <X11/Command.h>
  75. #include <X11/Box.h>
  76. #else /* R4 or later */
  77. #include <X11/Xaw/Command.h>
  78. #include <X11/Xaw/Box.h>
  79. #endif /* X11R3 */
  80. X
  81. #include "xetat.bit"
  82. #include "processus.bit"
  83. #include "activite.bit"
  84. X
  85. Pixmap pixmap_icone = None, pixmap_xetat, pixmap_processus, pixmap_activite;
  86. X
  87. /*
  88. X * Widgets utilises pour Xetat
  89. X */
  90. X
  91. Widget topLevel, forme_base, forme_activite, forme_processus;
  92. Widget bouton_activite, bouton_processus, bouton_quit, bouton_quit_processus, bouton_quit_activite, bouton_mise_a_jour_liste;
  93. Widget shell_processus, shell_activite, liste_processus, viewport_processus;
  94. Widget titre_idle, titre_user, titre_kernel, titre_wait, titre_sxbrk, titre_freemem;
  95. Widget indicateur_idle, indicateur_user, indicateur_kernel, indicateur_wait, indicateur_sxbrk, indicateur_freemem;
  96. Widget afficheur_idle, afficheur_user, afficheur_kernel, afficheur_wait, afficheur_sxbrk, afficheur_freemem;
  97. X
  98. Widget prototype_bouton_quit, prototype_label_titre, prototype_afficheur, prototype_indicateur, prototype_paned;
  99. X
  100. Widget popup_copyright, copyright;
  101. X
  102. /* descripteur de la memoire noyau */
  103. int kmem;
  104. X
  105. /* tampon */
  106. static char buf[80];
  107. X
  108. /* Nom de la machine hote */
  109. char host[20];    
  110. X
  111. /* Table des noms de processus */
  112. extern String table_processus[];
  113. X
  114. X
  115. extern void Activite(), Mise_a_jour_idle(), Mise_a_jour_user(), Mise_a_jour_kernel();
  116. extern void Mise_a_jour_wait(), Mise_a_jour_sxbrk(), Mise_a_jour_freemem();
  117. extern void Quit_activite(), Quit_processus(), Processus(), Selection();
  118. extern void Mise_a_jour_liste();
  119. extern void mesure_charge_courante_systeme ();
  120. X
  121. /*
  122. X * quit button callback function
  123. X */
  124. /*ARGSUSED*/
  125. void Quit(w, client_data, call_data)
  126. Widget w;
  127. caddr_t client_data, call_data;
  128. {
  129. X    close (kmem);
  130. X
  131. X    exit(0); 
  132. }
  133. X
  134. /* efface le message de copyright */
  135. X
  136. void supprime_copyright (client_data, id_intervalle)
  137. caddr_t *client_data;
  138. XXtIntervalId *id_intervalle;
  139. {
  140. X    XtDestroyWidget (popup_copyright);
  141. }
  142. X
  143. /* 
  144. X * Partie principale 
  145. X */
  146. X
  147. static XtConvertArgRec screenConvertArg[] = {
  148. X    {XtBaseOffset, (caddr_t) XtOffset(Widget, core.screen), sizeof(Screen *)}
  149. };
  150. X
  151. X
  152. main(argc, argv)
  153. int argc;
  154. char **argv;
  155. {
  156. X    Arg args[20];
  157. X    register int n;
  158. X    int dummy;
  159. X    unsigned int largeur_ecran, hauteur_ecran;
  160. X    Dimension hauteur_copyright, largeur_copyright;
  161. X    Window root;
  162. X
  163. X    /*
  164. X     * Initialisation du toplevel
  165. X     */
  166. X    
  167. X    topLevel = XtInitialize(
  168. X                argv[0],     /* application name */
  169. X                "XEtat",     /* application class name */
  170. X                NULL,     /* application resources (not used) */
  171. X                0,         /* application resource count */
  172. X                &argc,     /* command line argument count */
  173. X                argv);    /* command-line string */
  174. X
  175. X    /* nom du host */
  176. X    XmuGetHostname (host, 20);
  177. X    strcat (host, ":");
  178. X
  179. X    XGetGeometry (XtDisplay(topLevel), XtScreen(topLevel)->root, &root, &dummy, &dummy, &largeur_ecran, &hauteur_ecran, &dummy, &dummy);
  180. X
  181. X    pixmap_xetat = XCreateBitmapFromData(XtDisplay(topLevel), XtScreen(topLevel)->root, xetat_bits, xetat_width, xetat_height);
  182. X    pixmap_processus = XCreateBitmapFromData(XtDisplay(topLevel), XtScreen(topLevel)->root, processus_bits, processus_width, processus_height);
  183. X    pixmap_activite = XCreateBitmapFromData(XtDisplay(topLevel), XtScreen(topLevel)->root, activite_bits, activite_width, activite_height);
  184. X
  185. X
  186. X    /*
  187. X     * Creation du widget de base (formWidget)
  188. X     */
  189. X    
  190. X    forme_base = XtCreateManagedWidget(
  191. X                       "forme_base",    
  192. X                       formWidgetClass,    
  193. X                       topLevel,    
  194. X                       NULL,    
  195. X                       0    
  196. X                       );
  197. X
  198. X    /* popup copyright */
  199. X    popup_copyright = XtCreatePopupShell ("popup_copyright", overrideShellWidgetClass, forme_base, NULL, 0);
  200. X
  201. X    copyright = XtCreateManagedWidget(
  202. X        "copyright",            
  203. X             labelWidgetClass,     
  204. X             popup_copyright,    
  205. X             NULL,           
  206. X             0            
  207. X             );
  208. X
  209. X    /* lecture des dimensions du label copyright */
  210. X    n = 0;
  211. X    XtSetArg (args[n], XtNwidth, &largeur_copyright); n++;
  212. X    XtSetArg (args[n], XtNheight, &hauteur_copyright); n++;
  213. X    XtGetValues (copyright, args, n);
  214. X
  215. X    /* calcule et fixe les coordonnees du popup copyright */
  216. X    n = 0;
  217. X    XtSetArg (args[n], XtNx, largeur_ecran - largeur_copyright - 10); n++;
  218. X    XtSetArg (args[n], XtNy, hauteur_ecran - hauteur_copyright - 10); n++;
  219. X    XtSetValues (popup_copyright, args, n);
  220. X
  221. X    /*
  222. X     * Creation des boutons 
  223. X     */
  224. X    
  225. X    /* Bouton activite */
  226. X    bouton_activite = XtCreateManagedWidget ("bouton_activite", commandWidgetClass, forme_base, NULL, 0);
  227. X    
  228. X    /* Bouton Processus */
  229. X    bouton_processus = XtCreateManagedWidget ("bouton_processus", commandWidgetClass, forme_base, NULL, 0);
  230. X    
  231. X    /* Bouton Quit */
  232. X    bouton_quit = XtCreateManagedWidget ("bouton_quit", commandWidgetClass, forme_base, NULL, 0);
  233. X
  234. X    
  235. X    /*
  236. X     * Creation des shells
  237. X     */
  238. X    
  239. X    /* Shell processus */
  240. X    n = 0;
  241. X    XtSetArg(args[n], XtNiconPixmap, pixmap_processus); n++;
  242. X    shell_processus = XtCreatePopupShell (strcat (strcpy (buf, host), "proc"), applicationShellWidgetClass, forme_base, args, n);
  243. X    
  244. X    /* Shell activite */
  245. X    n = 0;
  246. X    XtSetArg(args[n], XtNiconPixmap, pixmap_activite); n++;
  247. X
  248. X    shell_activite = XtCreatePopupShell (strcat (strcpy (buf, host), "act"), applicationShellWidgetClass, forme_base, args, n);
  249. X
  250. X    
  251. X    
  252. X    /* Forme de base pour l'activite */
  253. X    forme_activite = XtCreateManagedWidget ("forme_activite", formWidgetClass, shell_activite, NULL, 0);
  254. X
  255. X    /* Forme de base pour les processus */
  256. X    forme_processus = XtCreateManagedWidget ("forme_processus", formWidgetClass, shell_processus, NULL, 0);
  257. X
  258. X
  259. X    /* 
  260. X     * Creation du Viewport pour la liste 
  261. X     */
  262. X    viewport_processus = XtCreateManagedWidget ("viewport_processus", viewportWidgetClass, forme_processus, NULL, 0);
  263. X
  264. X    /* Bouton Quit du shell processus */
  265. X    bouton_quit_processus = XtCreateManagedWidget ("bouton_quit_processus", commandWidgetClass, forme_processus, NULL, 0);
  266. X
  267. X    /* Bouton Mise a jour du shell processus */
  268. X    bouton_mise_a_jour_liste = XtCreateManagedWidget ("bouton_mise_a_jour_liste", commandWidgetClass, forme_processus, NULL, 0);
  269. X
  270. X
  271. X    /* 
  272. X     * Liste des processus 
  273. X     */
  274. X    n = 0;
  275. X    XtSetArg (args[n], XtNlist, (String *)table_processus); n++;
  276. X    liste_processus = XtCreateManagedWidget("liste_processus", listWidgetClass, viewport_processus, args, n);
  277. X    
  278. X
  279. X    /*
  280. X     * Creation des lignes
  281. X     */ 
  282. X    /* IDLE */
  283. X    titre_idle = XtCreateManagedWidget("titre_idle", labelWidgetClass, forme_activite, NULL, 0);
  284. X    indicateur_idle = XtCreateManagedWidget ("indicateur_idle", stripChartWidgetClass, forme_activite, NULL, 0);
  285. X    afficheur_idle = XtCreateManagedWidget ("afficheur_idle", labelWidgetClass, forme_activite, NULL, 0);
  286. X
  287. X    
  288. X    /* USER */
  289. X    titre_user = XtCreateManagedWidget("titre_user", labelWidgetClass, forme_activite, NULL, 0);
  290. X    indicateur_user = XtCreateManagedWidget ("indicateur_user", stripChartWidgetClass, forme_activite, NULL, 0);
  291. X    afficheur_user = XtCreateManagedWidget ("afficheur_user", labelWidgetClass, forme_activite, NULL, 0);
  292. X
  293. X    
  294. X    /* KERNEL */
  295. X    titre_kernel = XtCreateManagedWidget("titre_kernel", labelWidgetClass, forme_activite, NULL, 0);
  296. X    indicateur_kernel = XtCreateManagedWidget ("indicateur_kernel", stripChartWidgetClass, forme_activite, NULL, 0);
  297. X    afficheur_kernel = XtCreateManagedWidget ("afficheur_kernel", labelWidgetClass, forme_activite, NULL, 0);
  298. X
  299. X    
  300. X    /* WAIT */
  301. X    titre_wait = XtCreateManagedWidget ("titre_wait", labelWidgetClass, forme_activite, NULL, 0);
  302. X    indicateur_wait = XtCreateManagedWidget ("indicateur_wait", stripChartWidgetClass, forme_activite, NULL, 0);
  303. X    afficheur_wait = XtCreateManagedWidget ("afficheur_wait", labelWidgetClass, forme_activite, NULL, 0);
  304. X
  305. X    
  306. X    /* SXBRK */
  307. X    titre_sxbrk = XtCreateManagedWidget("titre_sxbrk", labelWidgetClass, forme_activite, NULL, 0);
  308. X    indicateur_sxbrk = XtCreateManagedWidget ("indicateur_sxbrk", stripChartWidgetClass, forme_activite, NULL, 0);
  309. X    afficheur_sxbrk = XtCreateManagedWidget ("afficheur_sxbrk", labelWidgetClass, forme_activite, NULL, 0);
  310. X
  311. X
  312. X    /* FREEMEM */
  313. X    titre_freemem = XtCreateManagedWidget("titre_freemem", labelWidgetClass, forme_activite, NULL, 0);
  314. X    indicateur_freemem = XtCreateManagedWidget ("indicateur_freemem", stripChartWidgetClass, forme_activite, NULL, 0);
  315. X    afficheur_freemem = XtCreateManagedWidget ("afficheur_freemem", labelWidgetClass, forme_activite, NULL, 0);
  316. X
  317. X    
  318. X    /* Bouton Quit du shell activite */
  319. X    bouton_quit_activite = XtCreateManagedWidget ("bouton_quit_activite", commandWidgetClass, forme_activite, NULL, 0);
  320. X
  321. X    /* Prototype des boutons quit des fenetres processus */
  322. X    prototype_bouton_quit = XtCreateWidget ("prototype_bouton_quit", commandWidgetClass, forme_base, NULL, 0);
  323. X
  324. X    /* Prototype des boutons quit des fenetres processus */
  325. X    prototype_label_titre = XtCreateWidget ("prototype_label_titre", labelWidgetClass, forme_base, NULL, 0);
  326. X
  327. X    /* Prototype d'indicateur */
  328. X    prototype_indicateur = XtCreateWidget ("prototype_indicateur", stripChartWidgetClass, forme_base, NULL, 0);
  329. X
  330. X    /* Prototype d'afficheur */
  331. X    prototype_afficheur = XtCreateWidget ("prototype_afficheur", labelWidgetClass, forme_base, NULL, 0);
  332. X
  333. X    prototype_paned = XtCreateWidget ("prototype_paned", panedWidgetClass, forme_base, NULL, 0);
  334. X
  335. X    /* Callbacks  */
  336. X    XtAddCallback(bouton_quit, XtNcallback, Quit, 0);
  337. X    XtAddCallback(bouton_quit_processus, XtNcallback, Quit_processus, 0);
  338. X    XtAddCallback(bouton_mise_a_jour_liste, XtNcallback, Mise_a_jour_liste, 0);
  339. X    XtAddCallback(bouton_quit_activite, XtNcallback, Quit_activite, 0);
  340. X    XtAddCallback(bouton_processus, XtNcallback, Processus, 0);
  341. X    XtAddCallback(bouton_activite, XtNcallback, Activite, 0);
  342. X    XtAddCallback(liste_processus, XtNcallback, Selection, 0);
  343. X
  344. X    /* callbacks des widget stripChart */
  345. X    XtAddCallback(indicateur_idle, XtNgetValue, Mise_a_jour_idle, NULL);
  346. X    XtAddCallback(indicateur_user, XtNgetValue, Mise_a_jour_user, NULL);
  347. X    XtAddCallback(indicateur_kernel, XtNgetValue, Mise_a_jour_kernel, NULL);
  348. X    XtAddCallback(indicateur_wait, XtNgetValue, Mise_a_jour_wait, NULL);
  349. X    XtAddCallback(indicateur_sxbrk, XtNgetValue, Mise_a_jour_sxbrk, NULL);
  350. X    XtAddCallback(indicateur_freemem, XtNgetValue, Mise_a_jour_freemem, NULL);
  351. X
  352. X
  353. X    /* Affichage */
  354. X    XtRealizeWidget(topLevel);
  355. X
  356. X    n = 0;
  357. X    XtSetArg (args[n], XtNiconPixmap, &pixmap_icone); n++;
  358. X    XtGetValues(topLevel, args, n);
  359. X
  360. X    /*
  361. X     * Contruction de l'icone
  362. X     */
  363. X    n = 0;
  364. X    XtSetArg (args[n], XtNiconPixmap, &pixmap_icone); n++;
  365. X    XtGetValues(topLevel, args, n);
  366. X
  367. X    if (pixmap_icone == None) {
  368. X    n = 0;
  369. X    XtSetArg(args[n], XtNiconPixmap, pixmap_xetat); n++;
  370. X    XtSetValues (topLevel, args, n);
  371. X    }
  372. X
  373. X    XtPopup (popup_copyright, XtGrabNone);
  374. X
  375. X    /* ouverture pour la lecture du noyau */
  376. X    if ((kmem = open ("/dev/kmem", 0)) < 0) {
  377. X    perror ("main-open");
  378. X    exit (1);
  379. X    }
  380. X
  381. X    /* Lecture de l'etat initial */
  382. X    init_charge();
  383. X
  384. X    /* Initialise le comptage */
  385. X    XtAddTimeOut ((unsigned long)4000, mesure_charge_courante_systeme, (caddr_t)NULL);
  386. X
  387. X    /* Pour effacer le copyright au bout de 5 s */
  388. X    XtAddTimeOut ((unsigned long)5000, supprime_copyright, (caddr_t)NULL);
  389. X
  390. X    /* En route... */
  391. X    XtMainLoop();
  392. }
  393. X
  394. X
  395. X
  396. X
  397. X
  398. X
  399. X
  400. X
  401. X
  402. X
  403. X
  404. X
  405. X
  406. X
  407. X
  408. X
  409. X
  410. SHAR_EOF
  411. chmod 0444 xetat.c ||
  412. echo 'restore of xetat.c failed'
  413. Wc_c="`wc -c < 'xetat.c'`"
  414. test 12724 -eq "$Wc_c" ||
  415.     echo 'xetat.c: original size 12724, current size' "$Wc_c"
  416. fi
  417. # ============= xetat.man.en ==============
  418. if test -f 'xetat.man.en' -a X"$1" != X"-c"; then
  419.     echo 'x - skipping xetat.man.en (File already exists)'
  420. else
  421. echo 'x - extracting xetat.man.en (Text)'
  422. sed 's/^X//' << 'SHAR_EOF' > 'xetat.man.en' &&
  423. .\" Copyright (c) 1991 Lectra-Systemes
  424. .\"
  425. .TH XETAT n "Lectra-Systemes" "12/91"
  426. .UC 5
  427. .SH NAME
  428. xetat \- graphical system activity reporter
  429. .SH SYNOPSIS
  430. xetat
  431. .SH DESCRIPTION
  432. .I xetat
  433. displays the system activity about
  434. .B "CPU"
  435. and
  436. .B "processes" .
  437. .LP
  438. This program was created for System V 3.2 and X11R4.
  439. .LP 
  440. You can display the CPU activity by clicking on 
  441. .B Activity
  442. button in the main menu. The activity is displayed with
  443. .B 6 
  444. stripcharts and indicators inside a popup shell (Idle, User, Kernel, Wait, Sxbrk, 
  445. Freemem). 
  446. The 5 first indicators display the activity as a ratio (percentage), the last one
  447. indicates the size of free memory (freemem) in
  448. .B clicks
  449. (4 Kbytes)
  450. and the graphic displays the ratio of freemem to available memory (availrmem)
  451. .LP 
  452. If you click on the 
  453. .B Processes
  454. button of the main menu, the list of active processes is displayed in a
  455. viewport. If you click the name of a process, a popup shell is created in order to
  456. display (in real time) the process characteristics (UID, PID, PPID, system time, user
  457. time, size) 
  458. .LP
  459. If a process is destroyed, the popup shell disappears and the list is updated. 
  460. You can also update the list by clicking the
  461. .B "Update" 
  462. button.
  463. .SH AUTHOR
  464. Pierre FICHEUX R&D Lectra-Systemes ZI Marticot 33610 Cestas FRANCE
  465. X
  466. X
  467. SHAR_EOF
  468. chmod 0644 xetat.man.en ||
  469. echo 'restore of xetat.man.en failed'
  470. Wc_c="`wc -c < 'xetat.man.en'`"
  471. test 1279 -eq "$Wc_c" ||
  472.     echo 'xetat.man.en: original size 1279, current size' "$Wc_c"
  473. fi
  474. # ============= xetat.man.fr ==============
  475. if test -f 'xetat.man.fr' -a X"$1" != X"-c"; then
  476.     echo 'x - skipping xetat.man.fr (File already exists)'
  477. else
  478. echo 'x - extracting xetat.man.fr (Text)'
  479. sed 's/^X//' << 'SHAR_EOF' > 'xetat.man.fr' &&
  480. .\" Copyright (c) 1991 Lectra-Systemes
  481. .\"
  482. .TH XETAT 1 "Lectra-Systemes" "12/91"
  483. .UC 5
  484. .SH NAME
  485. xetat \- visualisation graphique de la charge d'un calculateur 
  486. .SH SYNOPSIS
  487. xetat
  488. .SH DESCRIPTION
  489. .I xetat
  490. permet de visualiser la charge d'un calculateur au niveau 
  491. .B "activite CPU"
  492. et
  493. .B "processus" .
  494. .LP
  495. Cet utilitaire est prevu pour System V 3.2 et X11R4.
  496. .LP 
  497. On peut afficher l'activite CPU en cliquant sur le bouton 
  498. .B Activite
  499. du menu
  500. principal. L'activite est alors affichee sous forme d'un popup-shell contenant
  501. .B 6
  502. indicateurs (Idle, User, Kernel, Wait, Sxbrk, Freemem). Les 5 premiers affichent
  503. le pourcentage d'activite par rapport a l'activite totale. Le dernier affiche
  504. la taille memoire disponible (freemem) en 
  505. .B clicks
  506. (4 Ko), le graphe indiquant le pourcentage de freemem par rapport a la taille de la
  507. memoire utilisateur disponible (availrmem).
  508. .LP 
  509. Si on clique sur le bouton 
  510. .B Processus
  511. du menu principal, on affiche la liste des processus actuellement actifs. Si l'on 
  512. clique sur le nom d'un processus, on ouvre un popup-shell visualisant les 
  513. caracteristiques du processus en temps reel (UID, PID, PPID, temps systeme, temps
  514. utilisateur, graphe d'occupation memoire).
  515. Le graphe d'occupation memoire affiche la taille du processus par rapport a la 
  516. valeur de freemem.
  517. .LP
  518. Si un processus en cours de visualisation disparait du systeme, le popup-shell est
  519. supprime de l'ecran et la liste des processus est mise a jour. On peut egalement
  520. mettre a jour la liste en cliquant sur le bouton 
  521. .B "Rafraichit" .
  522. .SH AUTHOR
  523. Pierre FICHEUX R&D Lectra-Systemes ZI Marticot 33610 Cestas FRANCE
  524. .SH BUGS
  525. Comment dites-vous ?
  526. X
  527. X
  528. SHAR_EOF
  529. chmod 0644 xetat.man.fr ||
  530. echo 'restore of xetat.man.fr failed'
  531. Wc_c="`wc -c < 'xetat.man.fr'`"
  532. test 1640 -eq "$Wc_c" ||
  533.     echo 'xetat.man.fr: original size 1640, current size' "$Wc_c"
  534. fi
  535. # ============= XEtat.ad.en ==============
  536. if test -f 'XEtat.ad.en' -a X"$1" != X"-c"; then
  537.     echo 'x - skipping XEtat.ad.en (File already exists)'
  538. else
  539. echo 'x - extracting XEtat.ad.en (Text)'
  540. sed 's/^X//' << 'SHAR_EOF' > 'XEtat.ad.en' &&
  541. !
  542. ! Fichier de ressource du client XETAT (version anglaise)
  543. !
  544. ! Auteur : Pierre FICHEUX             Lectra-Systemes Service R & D  
  545. !                                     ZI Marticot                    
  546. !                                     33610 Cestas    FRANCE         
  547. !
  548. XXEtat*copyright*label:            (C)1991 Lectra Systemes
  549. XXEtat*Label*resize:            False
  550. !!
  551. ! Definition des titres des lignes
  552. !!
  553. ! Label
  554. XXEtat*titre_idle*label:            Idle
  555. XXEtat*titre_user*label:            User
  556. XXEtat*titre_kernel*label:        Kernel
  557. XXEtat*titre_wait*label:            Wait
  558. XXEtat*titre_sxbrk*label:        Sxbrk
  559. XXEtat*titre_freemem*label:        Freemem
  560. ! Justification : centre
  561. !XEtat*forme_activite*Label.justify:    center
  562. ! Hauteur = 15 pixels
  563. XXEtat*forme_activite*Label.height:    15
  564. ! Largeur = 65 pixels
  565. XXEtat*titre_idle*width:            65
  566. XXEtat*titre_user*width:            65
  567. XXEtat*titre_kernel*width:        65
  568. XXEtat*titre_wait*width:            65
  569. XXEtat*titre_sxbrk*width:        65
  570. XXEtat*titre_freemem*width:        65
  571. !!
  572. ! Definition des afficheurs
  573. !!
  574. ! Label par defaut
  575. XXEtat*afficheur_idle*label:        0   %
  576. XXEtat*afficheur_user*label:        0   %
  577. XXEtat*afficheur_kernel*label:            0   %
  578. XXEtat*afficheur_wait*label:        0   %
  579. XXEtat*afficheur_sxbrk*label:        0   %
  580. XXEtat*afficheur_freemem*label:        0   
  581. ! Largeur = 65 pixels
  582. XXEtat*afficheur_idle*width:        65
  583. XXEtat*afficheur_user*width:        65
  584. XXEtat*afficheur_kernel*width:        65
  585. XXEtat*afficheur_wait*width:        65
  586. XXEtat*afficheur_sxbrk*width:        65
  587. XXEtat*afficheur_freemem*width:        65
  588. !!
  589. ! Definition des indicateurs
  590. !!
  591. ! Largeur
  592. XXEtat*indicateur_idle*width:        65
  593. XXEtat*indicateur_user*width:        65
  594. XXEtat*indicateur_kernel*width:        65
  595. XXEtat*indicateur_wait*width:        65
  596. XXEtat*indicateur_sxbrk*width:        65
  597. XXEtat*indicateur_freemem*width:        65
  598. ! Hauteur
  599. XXEtat*indicateur_idle*height:        60
  600. XXEtat*indicateur_user*height:        60
  601. XXEtat*indicateur_kernel*height:        60
  602. XXEtat*indicateur_wait*height:        60
  603. XXEtat*indicateur_sxbrk*height:        60
  604. XXEtat*indicateur_freemem*height:    60
  605. !
  606. ! Positions
  607. !
  608. XXEtat*titre_user*fromHoriz:        titre_idle
  609. XXEtat*titre_kernel*fromHoriz:        titre_user
  610. XXEtat*titre_wait*fromHoriz:        titre_kernel
  611. XXEtat*titre_sxbrk*fromHoriz:        titre_wait
  612. XXEtat*titre_freemem*fromHoriz:        titre_sxbrk
  613. X
  614. XXEtat*indicateur_idle*fromVert:        titre_idle
  615. XXEtat*indicateur_user*fromVert:        titre_user
  616. XXEtat*indicateur_kernel*fromVert:    titre_kernel
  617. XXEtat*indicateur_wait*fromVert:        titre_wait
  618. XXEtat*indicateur_sxbrk*fromVert:    titre_sxbrk
  619. XXEtat*indicateur_freemem*fromVert:    titre_freemem
  620. X
  621. XXEtat*indicateur_user*fromHoriz:    indicateur_idle
  622. XXEtat*indicateur_kernel*fromHoriz:    indicateur_user
  623. XXEtat*indicateur_wait*fromHoriz:    indicateur_kernel
  624. XXEtat*indicateur_sxbrk*fromHoriz:    indicateur_wait
  625. XXEtat*indicateur_freemem*fromHoriz:    indicateur_sxbrk
  626. X
  627. !
  628. XXEtat*afficheur_user*fromHoriz:        afficheur_idle
  629. XXEtat*afficheur_kernel*fromHoriz:    afficheur_user
  630. XXEtat*afficheur_wait*fromHoriz:        afficheur_kernel
  631. XXEtat*afficheur_sxbrk*fromHoriz:    afficheur_wait
  632. XXEtat*afficheur_freemem*fromHoriz:    afficheur_sxbrk
  633. XXEtat*afficheur_idle*fromVert:        indicateur_idle
  634. XXEtat*afficheur_user*fromVert:        indicateur_user
  635. XXEtat*afficheur_kernel*fromVert:    indicateur_kernel
  636. XXEtat*afficheur_wait*fromVert:        indicateur_wait
  637. XXEtat*afficheur_sxbrk*fromVert:        indicateur_sxbrk
  638. XXEtat*afficheur_freemem*fromVert:    indicateur_freemem
  639. X
  640. !!
  641. ! Boutons de l'ecran principal
  642. !!
  643. XXEtat*forme_base*Command.justify:        center
  644. XXEtat*forme_base*Command.vertDistance:        10
  645. XXEtat*bouton_activite*label:            Activity
  646. XXEtat*bouton_processus*label:            Processes
  647. XXEtat*bouton_processus*fromVert:        bouton_activite
  648. XXEtat*bouton_quit*label:            Quit
  649. XXEtat*bouton_quit*fromVert:            bouton_processus
  650. XXEtat*bouton_processus*width:            100
  651. XXEtat*bouton_activite*width:            100
  652. XXEtat*bouton_quit*width:            100
  653. !!
  654. ! Viewport des processus
  655. !!
  656. XXEtat*viewport_processus*allowHoriz:        TRUE
  657. XXEtat*viewport_processus*allowVert:        TRUE
  658. XXEtat*viewport_processus*forceBars:        TRUE
  659. XXEtat*viewport_processus*useBottom:        TRUE
  660. !!
  661. ! Bouton quit du shell processus
  662. !!
  663. XXEtat*bouton_quit_processus*horizDistance:    130
  664. XXEtat*bouton_quit_processus*vertDistance:    10
  665. XXEtat*bouton_quit_processus*width:        100
  666. XXEtat*bouton_quit_processus*label:        Quit
  667. XXEtat*bouton_quit_processus*fromVert:        viewport_processus
  668. !!
  669. ! Bouton mise a jour du shell processus
  670. !!
  671. XXEtat*bouton_mise_a_jour_liste*horizDistance:    15
  672. XXEtat*bouton_quit_processus*width:        100
  673. XXEtat*bouton_mise_a_jour_liste*fromHoriz:    bouton_quit_processus
  674. XXEtat*bouton_mise_a_jour_liste*vertDistance:    10
  675. XXEtat*bouton_mise_a_jour_liste*label:        Update
  676. XXEtat*bouton_mise_a_jour_liste*fromVert:    viewport_processus
  677. !!
  678. ! Bouton quit du shell activite
  679. !!
  680. XXEtat*bouton_quit_activite*horizDistance:    160
  681. XXEtat*bouton_quit_activite*vertDistance:    10
  682. XXEtat*bouton_quit_activite*width:        100
  683. XXEtat*bouton_quit_activite*label:        Quit
  684. XXEtat*bouton_quit_activite*fromVert:        afficheur_freemem
  685. !!
  686. ! Prototype bouton quit
  687. !!
  688. XXEtat*prototype_bouton_quit*label:        Quit
  689. XXEtat*prototype_bouton_quit*horizDistance:    80
  690. XXEtat*prototype_bouton_quit*width:        100
  691. !!
  692. ! Prototype label titre
  693. !!
  694. XXEtat*prototype_label_titre*label:        UID PID   PPID  System  User  
  695. XXEtat*prototype_label_titre*borderwidth:    0          
  696. !!
  697. ! Prototype Paned
  698. !!
  699. XXEtat*showGrip:                    FALSE
  700. XXEtat*internalBorderWidth:            0
  701. XXEtat*prototype_paned*width:            248
  702. XXEtat*prototype_paned*height:            50
  703. !!
  704. ! Prototype de l'indicateur d'occupation memoire
  705. !!
  706. XXEtat*prototype_indicateur*width:        248
  707. XXEtat*prototype_indicateur*height:        30
  708. !!
  709. ! Prototype de l'afficheur d'occupation memoire
  710. !!
  711. XXEtat*prototype_afficheur*label:        0 / 0  
  712. XXEtat*prototype_afficheur*height:        8
  713. !!
  714. ! Liste des processus
  715. !!
  716. XXEtat*liste_processus*longest:            150
  717. XXEtat*liste_processus*defaultColumns:        3
  718. X
  719. X
  720. X
  721. X
  722. X
  723. X
  724. X
  725. SHAR_EOF
  726. chmod 0644 XEtat.ad.en ||
  727. echo 'restore of XEtat.ad.en failed'
  728. Wc_c="`wc -c < 'XEtat.ad.en'`"
  729. test 5546 -eq "$Wc_c" ||
  730.     echo 'XEtat.ad.en: original size 5546, current size' "$Wc_c"
  731. fi
  732. # ============= XEtat.ad.fr ==============
  733. if test -f 'XEtat.ad.fr' -a X"$1" != X"-c"; then
  734.     echo 'x - skipping XEtat.ad.fr (File already exists)'
  735. else
  736. echo 'x - extracting XEtat.ad.fr (Text)'
  737. sed 's/^X//' << 'SHAR_EOF' > 'XEtat.ad.fr' &&
  738. !
  739. ! Fichier de ressource du client XETAT
  740. !
  741. ! Auteur : Pierre FICHEUX             Lectra-Systemes Service R & D  
  742. !                                     ZI Marticot                    
  743. !                                     33610 Cestas    FRANCE         
  744. !
  745. XXEtat*copyright*label:            (C)1991 Lectra Systemes
  746. XXEtat*Label*resize:            False
  747. !!
  748. ! Definition des titres des lignes
  749. !!
  750. ! Label
  751. XXEtat*titre_idle*label:            Idle
  752. XXEtat*titre_user*label:            User
  753. XXEtat*titre_kernel*label:        Kernel
  754. XXEtat*titre_wait*label:            Wait
  755. XXEtat*titre_sxbrk*label:        Sxbrk
  756. XXEtat*titre_freemem*label:        Freemem
  757. ! Justification : centre
  758. !XEtat*forme_activite*Label.justify:    center
  759. ! Hauteur = 15 pixels
  760. XXEtat*forme_activite*Label.height:    15
  761. ! Largeur = 65 pixels
  762. XXEtat*titre_idle*width:            65
  763. XXEtat*titre_user*width:            65
  764. XXEtat*titre_kernel*width:        65
  765. XXEtat*titre_wait*width:            65
  766. XXEtat*titre_sxbrk*width:        65
  767. XXEtat*titre_freemem*width:        65
  768. !!
  769. ! Definition des afficheurs
  770. !!
  771. ! Label par defaut
  772. XXEtat*afficheur_idle*label:        0   %
  773. XXEtat*afficheur_user*label:        0   %
  774. XXEtat*afficheur_kernel*label:            0   %
  775. XXEtat*afficheur_wait*label:        0   %
  776. XXEtat*afficheur_sxbrk*label:        0   %
  777. XXEtat*afficheur_freemem*label:        0   
  778. ! Largeur = 65 pixels
  779. XXEtat*afficheur_idle*width:        65
  780. XXEtat*afficheur_user*width:        65
  781. XXEtat*afficheur_kernel*width:        65
  782. XXEtat*afficheur_wait*width:        65
  783. XXEtat*afficheur_sxbrk*width:        65
  784. XXEtat*afficheur_freemem*width:        65
  785. !!
  786. ! Definition des indicateurs
  787. !!
  788. ! Largeur
  789. XXEtat*indicateur_idle*width:        65
  790. XXEtat*indicateur_user*width:        65
  791. XXEtat*indicateur_kernel*width:        65
  792. XXEtat*indicateur_wait*width:        65
  793. XXEtat*indicateur_sxbrk*width:        65
  794. XXEtat*indicateur_freemem*width:        65
  795. ! Hauteur
  796. XXEtat*indicateur_idle*height:        60
  797. XXEtat*indicateur_user*height:        60
  798. XXEtat*indicateur_kernel*height:        60
  799. XXEtat*indicateur_wait*height:        60
  800. XXEtat*indicateur_sxbrk*height:        60
  801. XXEtat*indicateur_freemem*height:    60
  802. !
  803. ! Positions
  804. !
  805. XXEtat*titre_user*fromHoriz:        titre_idle
  806. XXEtat*titre_kernel*fromHoriz:        titre_user
  807. XXEtat*titre_wait*fromHoriz:        titre_kernel
  808. XXEtat*titre_sxbrk*fromHoriz:        titre_wait
  809. XXEtat*titre_freemem*fromHoriz:        titre_sxbrk
  810. X
  811. XXEtat*indicateur_idle*fromVert:        titre_idle
  812. XXEtat*indicateur_user*fromVert:        titre_user
  813. XXEtat*indicateur_kernel*fromVert:    titre_kernel
  814. XXEtat*indicateur_wait*fromVert:        titre_wait
  815. XXEtat*indicateur_sxbrk*fromVert:    titre_sxbrk
  816. XXEtat*indicateur_freemem*fromVert:    titre_freemem
  817. X
  818. XXEtat*indicateur_user*fromHoriz:    indicateur_idle
  819. XXEtat*indicateur_kernel*fromHoriz:    indicateur_user
  820. XXEtat*indicateur_wait*fromHoriz:    indicateur_kernel
  821. XXEtat*indicateur_sxbrk*fromHoriz:    indicateur_wait
  822. XXEtat*indicateur_freemem*fromHoriz:    indicateur_sxbrk
  823. X
  824. !
  825. XXEtat*afficheur_user*fromHoriz:        afficheur_idle
  826. XXEtat*afficheur_kernel*fromHoriz:    afficheur_user
  827. XXEtat*afficheur_wait*fromHoriz:        afficheur_kernel
  828. XXEtat*afficheur_sxbrk*fromHoriz:    afficheur_wait
  829. XXEtat*afficheur_freemem*fromHoriz:    afficheur_sxbrk
  830. XXEtat*afficheur_idle*fromVert:        indicateur_idle
  831. XXEtat*afficheur_user*fromVert:        indicateur_user
  832. XXEtat*afficheur_kernel*fromVert:    indicateur_kernel
  833. XXEtat*afficheur_wait*fromVert:        indicateur_wait
  834. XXEtat*afficheur_sxbrk*fromVert:        indicateur_sxbrk
  835. XXEtat*afficheur_freemem*fromVert:    indicateur_freemem
  836. X
  837. !!
  838. ! Boutons de l'ecran principal
  839. !!
  840. XXEtat*forme_base*Command.justify:        center
  841. XXEtat*forme_base*Command.vertDistance:        10
  842. XXEtat*bouton_activite*label:            Activite
  843. XXEtat*bouton_processus*label:            Processus
  844. XXEtat*bouton_processus*fromVert:        bouton_activite
  845. XXEtat*bouton_quit*label:            Quitte
  846. XXEtat*bouton_quit*fromVert:            bouton_processus
  847. XXEtat*bouton_processus*width:            100
  848. XXEtat*bouton_activite*width:            100
  849. XXEtat*bouton_quit*width:            100
  850. !!
  851. ! Viewport des processus
  852. !!
  853. XXEtat*viewport_processus*allowHoriz:        TRUE
  854. XXEtat*viewport_processus*allowVert:        TRUE
  855. XXEtat*viewport_processus*forceBars:        TRUE
  856. XXEtat*viewport_processus*useBottom:        TRUE
  857. !!
  858. ! Bouton quit du shell processus
  859. !!
  860. XXEtat*bouton_quit_processus*horizDistance:    130
  861. XXEtat*bouton_quit_processus*vertDistance:    10
  862. XXEtat*bouton_quit_processus*width:        100
  863. XXEtat*bouton_quit_processus*label:        Quitte
  864. XXEtat*bouton_quit_processus*fromVert:        viewport_processus
  865. !!
  866. ! Bouton mise a jour du shell processus
  867. !!
  868. XXEtat*bouton_mise_a_jour_liste*horizDistance:    15
  869. XXEtat*bouton_quit_processus*width:        100
  870. XXEtat*bouton_mise_a_jour_liste*fromHoriz:    bouton_quit_processus
  871. XXEtat*bouton_mise_a_jour_liste*vertDistance:    10
  872. XXEtat*bouton_mise_a_jour_liste*label:        Rafraichit
  873. XXEtat*bouton_mise_a_jour_liste*fromVert:    viewport_processus
  874. !!
  875. ! Bouton quit du shell activite
  876. !!
  877. XXEtat*bouton_quit_activite*horizDistance:    160
  878. XXEtat*bouton_quit_activite*vertDistance:    10
  879. XXEtat*bouton_quit_activite*width:        100
  880. XXEtat*bouton_quit_activite*label:        Quitte
  881. XXEtat*bouton_quit_activite*fromVert:        afficheur_freemem
  882. !!
  883. ! Prototype bouton quit
  884. !!
  885. XXEtat*prototype_bouton_quit*label:        Quitte
  886. XXEtat*prototype_bouton_quit*horizDistance:    80
  887. XXEtat*prototype_bouton_quit*width:        100
  888. !!
  889. ! Prototype label titre
  890. !!
  891. XXEtat*prototype_label_titre*label:        UID PID   PPID  System  User  
  892. XXEtat*prototype_label_titre*borderwidth:    0          
  893. !!
  894. ! Prototype Paned
  895. !!
  896. XXEtat*showGrip:                    FALSE
  897. XXEtat*internalBorderWidth:            0
  898. XXEtat*prototype_paned*width:            248
  899. XXEtat*prototype_paned*height:            50
  900. !!
  901. ! Prototype de l'indicateur d'occupation memoire
  902. !!
  903. XXEtat*prototype_indicateur*width:        248
  904. XXEtat*prototype_indicateur*height:        30
  905. !!
  906. ! Prototype de l'afficheur d'occupation memoire
  907. !!
  908. XXEtat*prototype_afficheur*label:        0 / 0  
  909. XXEtat*prototype_afficheur*height:        8
  910. !!
  911. ! Liste des processus
  912. !!
  913. XXEtat*liste_processus*longest:            150
  914. XXEtat*liste_processus*defaultColumns:        3
  915. X
  916. X
  917. X
  918. X
  919. X
  920. X
  921. X
  922. SHAR_EOF
  923. chmod 0644 XEtat.ad.fr ||
  924. echo 'restore of XEtat.ad.fr failed'
  925. Wc_c="`wc -c < 'XEtat.ad.fr'`"
  926. test 5539 -eq "$Wc_c" ||
  927.     echo 'XEtat.ad.fr: original size 5539, current size' "$Wc_c"
  928. fi
  929. exit 0
  930.  
  931.  _____________________________________________________________________________
  932. | Pierre FICHEUX                     | Certains hommes n'ont que ce qu'ils    |
  933. | Lectra Systemes                    | meritent, les autres sont celibataires |
  934. | ZI Marticot  33610 CESTAS          |                                        |
  935. | FRANCE                             |                   Sacha Guitry         |
  936. |------------------------------------|----------------------------------------'
  937. |tel   : (33) 56 68 80 00            |
  938. |fax   : (33) 56 78 88 31            |
  939. |E-mail: pficheux@lectra.gna.org     |
  940. |____________________________________|
  941. -- 
  942. --
  943. Molecular Simulations, Inc.            mail: dcmartin@msi.com
  944. 796 N. Pastoria Avenue                uucp: uunet!dcmartin
  945. Sunnyvale, California 94086            at&t: 408/522-9236
  946.