asmon-0.71/0000750000175000017500000000000010640524212012071 5ustar eevanseevansasmon-0.71/asmon.icon.xpm0000640000175000017500000000560606727543727014722 0ustar eevanseevans/* XPM */ static char * xemacs_xpm[] = { /* XEmacs pixmap * width height ncolors chars_per_pixel */ "50 50 5 1", /**/ " s None c None", ". m black c darkslategrey", "X m white c orange", "o m black c slate blue", "O m white c white", /* pixels */ " ", " ", " ...... ... ", " .. ... ", " ............. ", " .XXXXXXXXXX... ", " .XX............ ", " .X. ... ", " ..... ... ", " ... ", " o ... ", " o ... ", " ... ", " o o o ... ", " oo oo ... ", " ooo ... ", " .......................................... ", " o ......................................... ", " o ....................................... ", " o ..................................... ", " o ..................................... ", " ..................................... ", " ..................................... ", " o ..................................... ", " oo ......OOO...OOOO..................... ", " o .....OO.OO.O......................... ", " .....O...O.O.....OO.OO..OO...OOO..... ", " .....OOOOO..OOO..O.O.O.O..O..O..O.... ", " .....O...O.....O.O.O.O.O..O..O..O.... ", " o .....O...O.....O.O...O.O..O..O..O.... ", " oo .....O...O.OOOO..O...O..OO...O..O.... ", " o ..................................... ", " ..................................... ", " ..................................... ", " ..................................... ", " ..................................... ", " o ................................... ", " o ................................. ", " oo ..X.. ", " .X. .... ", " .X. .XXXX. ", " .X. .XX..XX. ", " .X. .X. .X. ", " o .XX..XX. .X. ", " o .XXXX. .X. ", " o o .... .X. ", " .X. ", " ", " ", " "}; asmon-0.71/COPYING0000640000175000017500000004307606530377101013145 0ustar eevanseevans GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. asmon-0.71/Changelog0000640000175000017500000000465610640524212013717 0ustar eevanseevansasmon-0.71 - Patch from Eric Evans to fix problems with the Uptime not rolling over after more than 10 days. asmon-0.7 - Fixed a graphics bug when X mem is over 100 mb - Fixed a bug in regards to throttling cpus - Eric Evans - added support for Linux Kernel 2.6 - apollock@debian.org - fixed problem with more powerful cpus - fixed problem with very large memory systems asmon-0.60 - fixed glitch when only shared mem shown - Eric Davis - ported to Solaris - added code to refresh the area of the memory and swap bars - fixed a few math bugs asmon-0.51 - added support for more than 9 days uptime - added support for load average higher than 9.99 - fixed the mem bar for >99 megs of ram - added "Kitchen Sink" for WavePoet - fixed a couple graphics glitches asmon-0.50 - fixed yet another bug in the X mem bar, it should behave now - integrated patch from Dmytro Sudak , allowing execution of a program when you click on asmon, with "-e " asmon-0.49 - fixed bug in X mem usage bar asmon-0.48 - tweaked a few things asmon-0.47 - more CPU optimization - cleaned up the code alot asmon-0.46 - it now checks both /tmp/.X0-lock and /var/run/server.0.pid for X's pid asmon-0.45 - cleaned up the code a bunch - some optimization asmon-0.44 - added -m option to show only Shared mem like other mem meters asmon-0.43 - increased the time interval between mem updates to lower cpu usage - fixed the >100 megs bug - added "-u" option to force uptime display - fixed a few other minor things that I don't remember asmon-0.42 - fixed some math errors - put a limiter on the X mem bar - fixed problem of crashing when no Swap exists asmon-0.4 - made X mem meter only appear if X pid can be found otherwise diverting to uptime asmon-0.3 - put in X mem meter asmon-0.2 - stomped a few bugs - first official release asmon-0.15 - tweaked the graphs - changed the name - fixed -h docs asmem-0.1e - put brackets on the graphs asmem-0.1d - fixed overzealous bra graphs asmem-0.1c - moved the cpu meter over one pixel asmem-0.1b - re-integrated CPU monitor - removed ladavg bar asmem-0.1a - added page/swap LED's asmem-0.1 - changed from wmcpu - Removed CPU Usage Meter - Added Swap Usage Meter - Added Number of megs next to mem meters - Added Load avg number - Changed mem splits to tick marks rather than colors - Put in better colors taken from wmsysmon asmon-0.71/INSTALL0000640000175000017500000000056410132771750013137 0ustar eevanseevansInstallation instructions for asmon Installation -------------------------------------------------------------- 1) % tar -zxvf asmon-0.7.tar.gz 2) % cd amon-0.7/asmon 3) % make 4) % make install 5) % asmon & (or asmon -h for help) Solaris -------------------------------------------------------------- Uncomment the appropriate lines in the Makefile before compiling. asmon-0.71/wmgeneral/0000750000175000017500000000000010640524261014056 5ustar eevanseevansasmon-0.71/wmgeneral/wmgeneral.o0000644000175000017500000001754010640524261016233 0ustar eevanseevansELFh4( UWSETE PeE1DždD$T$hh|ADžppPD$t$``pPLLЃ`dD$`$`D$`$lltl`pP@$pPX`$DžpppxpPhD$D$t$h$Ee3t[_]UVSĀ ED$T$ $E@€EPEUM5D$T$L$ E D$\$4$E}t1D$ D$D$$ $[^]U ED$T$ $EUԋ ED$ ED$T$ $uED$D$($=Uԋ ED$T$ $uED$D$A$EUeE1EEED$ D$ ED$$uԋEUe3tUWVS,$ 5=D$$D$ D$T$D$D$L$ \$t$<$$ 5=D$$D$ D$T$D$D$L$ \$t$<$,[^_]UWVS,$ 5=D$$D$ D$T$E D$ED$L$ \$t$<$$8 5=D$$D$ D$T$E D$ED$L$ \$t$<$,[^_]U}UǀUЍEUЍE UЍEUЍE]UEEUtgU;E|OU ;E7U;E |U;E EE} }n}u E EEEUWVS,UM5=EED$$ED$ T$L$E D$ED$\$ t$|$E$,[^_]UWVS,UM5=EED$$ED$ T$L$E D$ED$\$ t$|$E$,[^_]U( D$D$E D$ED$ D$T$ $ D$D$E D$ED$ D$T$ $UWVSEEE EEEbEE HDžD]Dž@ HD@(uEE EEEE uE$u8E$U D$ T$D$f $$‰@‰@$$ED$$B$$ E܉D$(D$$D$ D$D$D$ED$D$ T$L$$ @@ L Ë5=PTT$ L$ED$LL$\$t$ |$Pt$T<$ X Ë5=\`T$ L$ED$XL$\$t$ |$\t$`<$D$D$$EEԋEE؋ EԉD$T$ $D$LD$$D$LD$$EĉD$D$E$u)ED$D$$$ EĉD$T$ $E ptE hD$ ED$T$ $EU D$T$ ED$L$$ D$D$D$D$ D$T$ $ D$D$D$D$ D$T$ $ ZD$D$$ ED$ E D$T$ $D$$[^_] : r# Not enough free colorcells. wm.app: can't parse %s. wm.app: can't allocate %s. -display%s: can't open display %s whiteblack%s: can't allocate window name GCC: (GNU) 4.1.2 (Ubuntu 4.1.2-0ubuntu4).symtab.strtab.shstrtab.rel.text.rel.data.bss.rodata.comment.note.GNU-stack4   )4% X /848<*EUHp   \_*3@FMT\ahnu  %.8<KZ gxlGl9 H *>P^k $wmgeneral.cGetXPMGetColorflush_exposeGeometryparse_rcfilefopenstrstrstrspnstrcspnfreestrdupfgetsfclose__stack_chk_failRootdisplayXGetWindowAttributesXpmCreatePixmapFromDatastderrfwriteexitXParseColorfprintfXAllocColorXCheckTypedWindowEventRedrawWindowiconwinwmgenNormalGCXCopyAreawinRedrawWindowXYAddMouseRegionmouse_regionCheckMouseRegioncopyXPMAreacopyXBMAreasetMaskXYpixmaskXShapeCombineMaskopenXwindowXOpenDisplayXDisplayNamescreend_depthXConnectionNumberx_fdmysizehintsback_pixfore_pixXWMGeometryXCreateSimpleWindowXSetWMNormalHintsXSetClassHintXSelectInputXStringListToTextPropertyXSetWMNameXCreateGCXCreateBitmapFromDatamywmhintsXSetWMHintsXSetCommandXMapWindow.6D  Ff;A`n 2<KS "##$"#,%1&>#D#J$P&V#\%"##$"#%&%#+#1$7&=#C}%)))) );)R)j)))$##;%X$^#d#i%.&/."3/12   ) . 9 3> I 3` e p 3 4  5 6 # 7 7 7  8  9  3  7 7 7% 7- 7L :R 7\ 7f 8l 9q 7| 7 7 7   ; & 8 9 7 7 7 7 & _ ;d "i &o w 7 < &  = &  > "  > ?  ' 3 9 &? R @^ 9i 8|   A $ &  B . . &  / ." "( X /^ Cg "l Cq 7v C{ 7 C & C C &  C D &  E &  Fasmon-0.71/wmgeneral/wmgeneral.c0000640000175000017500000002407106530372763016223 0ustar eevanseevans/* Best viewed with vim5, using ts=4 wmgeneral was taken from wmppp. It has a lot of routines which most of the wm* programs use. ------------------------------------------------------------ Author: Martijn Pieterse (pieterse@xs4all.nl) --- CHANGES: --- 02/05/1998 (Martijn Pieterse, pieterse@xs4all.nl) * changed the read_rc_file to parse_rcfile, as suggester by Marcelo E. Magallon * debugged the parse_rc file. 30/04/1998 (Martijn Pieterse, pieterse@xs4all.nl) * Ripped similar code from all the wm* programs, and put them in a single file. */ #include #include #include #include #include #include #include #include #include #include "wmgeneral.h" /*****************/ /* X11 Variables */ /*****************/ Window Root; int screen; int x_fd; int d_depth; XSizeHints mysizehints; XWMHints mywmhints; Pixel back_pix, fore_pix; char *Geometry = ""; Window iconwin, win; GC NormalGC; XpmIcon wmgen; Pixmap pixmask; /*****************/ /* Mouse Regions */ /*****************/ typedef struct { int enable; int top; int bottom; int left; int right; } MOUSE_REGION; #define MAX_MOUSE_REGION (8) MOUSE_REGION mouse_region[MAX_MOUSE_REGION]; /***********************/ /* Function Prototypes */ /***********************/ static void GetXPM(XpmIcon *, char **); static Pixel GetColor(char *); void RedrawWindow(void); void AddMouseRegion(int, int, int, int, int); int CheckMouseRegion(int, int); /*******************************************************************************\ |* read_rc_file *| \*******************************************************************************/ void parse_rcfile(const char *filename, rckeys *keys) { char *p; char temp[128]; char *tokens = " :\t\n"; FILE *fp; int i,key; fp = fopen(filename, "r"); if (fp) { while (fgets(temp, 128, fp)) { key = 0; while (key >= 0 && keys[key].label) { if ((p = strstr(temp, keys[key].label))) { p += strlen(keys[key].label); p += strspn(p, tokens); if ((i = strcspn(p, "#\n"))) p[i] = 0; free(*keys[key].var); *keys[key].var = strdup(p); key = -1; } else key++; } } fclose(fp); } } /*******************************************************************************\ |* GetXPM *| \*******************************************************************************/ static void GetXPM(XpmIcon *wmgen, char *pixmap_bytes[]) { XWindowAttributes attributes; int err; /* For the colormap */ XGetWindowAttributes(display, Root, &attributes); wmgen->attributes.valuemask |= (XpmReturnPixels | XpmReturnExtensions); err = XpmCreatePixmapFromData(display, Root, pixmap_bytes, &(wmgen->pixmap), &(wmgen->mask), &(wmgen->attributes)); if (err != XpmSuccess) { fprintf(stderr, "Not enough free colorcells.\n"); exit(1); } } /*******************************************************************************\ |* GetColor *| \*******************************************************************************/ static Pixel GetColor(char *name) { XColor color; XWindowAttributes attributes; XGetWindowAttributes(display, Root, &attributes); color.pixel = 0; if (!XParseColor(display, attributes.colormap, name, &color)) { fprintf(stderr, "wm.app: can't parse %s.\n", name); } else if (!XAllocColor(display, attributes.colormap, &color)) { fprintf(stderr, "wm.app: can't allocate %s.\n", name); } return color.pixel; } /*******************************************************************************\ |* flush_expose *| \*******************************************************************************/ static int flush_expose(Window w) { XEvent dummy; int i=0; while (XCheckTypedWindowEvent(display, w, Expose, &dummy)) i++; return i; } /*******************************************************************************\ |* RedrawWindow *| \*******************************************************************************/ void RedrawWindow(void) { flush_expose(iconwin); XCopyArea(display, wmgen.pixmap, iconwin, NormalGC, 0,0, wmgen.attributes.width, wmgen.attributes.height, 0,0); flush_expose(win); XCopyArea(display, wmgen.pixmap, win, NormalGC, 0,0, wmgen.attributes.width, wmgen.attributes.height, 0,0); } /*******************************************************************************\ |* RedrawWindowXY *| \*******************************************************************************/ void RedrawWindowXY(int x, int y) { flush_expose(iconwin); XCopyArea(display, wmgen.pixmap, iconwin, NormalGC, x,y, wmgen.attributes.width, wmgen.attributes.height, 0,0); flush_expose(win); XCopyArea(display, wmgen.pixmap, win, NormalGC, x,y, wmgen.attributes.width, wmgen.attributes.height, 0,0); } /*******************************************************************************\ |* AddMouseRegion *| \*******************************************************************************/ void AddMouseRegion(int index, int left, int top, int right, int bottom) { if (index < MAX_MOUSE_REGION) { mouse_region[index].enable = 1; mouse_region[index].top = top; mouse_region[index].left = left; mouse_region[index].bottom = bottom; mouse_region[index].right = right; } } /*******************************************************************************\ |* CheckMouseRegion *| \*******************************************************************************/ int CheckMouseRegion(int x, int y) { int i; int found; found = 0; for (i=0; i= mouse_region[i].left && y <= mouse_region[i].bottom && y >= mouse_region[i].top) found = 1; } if (!found) return -1; return (i-1); } /*******************************************************************************\ |* copyXPMArea *| \*******************************************************************************/ void copyXPMArea(int x, int y, int sx, int sy, int dx, int dy) { XCopyArea(display, wmgen.pixmap, wmgen.pixmap, NormalGC, x, y, sx, sy, dx, dy); } /*******************************************************************************\ |* copyXBMArea *| \*******************************************************************************/ void copyXBMArea(int x, int y, int sx, int sy, int dx, int dy) { XCopyArea(display, wmgen.mask, wmgen.pixmap, NormalGC, x, y, sx, sy, dx, dy); } /*******************************************************************************\ |* setMaskXY *| \*******************************************************************************/ void setMaskXY(int x, int y) { XShapeCombineMask(display, win, ShapeBounding, x, y, pixmask, ShapeSet); XShapeCombineMask(display, iconwin, ShapeBounding, x, y, pixmask, ShapeSet); } /*******************************************************************************\ |* openXwindow *| \*******************************************************************************/ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bits, int pixmask_width, int pixmask_height) { unsigned int borderwidth = 1; XClassHint classHint; char *display_name = NULL; char *wname = argv[0]; XTextProperty name; XGCValues gcv; unsigned long gcm; int dummy=0; int i; for (i=1; argv[i]; i++) { if (!strcmp(argv[i], "-display")) display_name = argv[i+1]; } if (!(display = XOpenDisplay(display_name))) { fprintf(stderr, "%s: can't open display %s\n", wname, XDisplayName(display_name)); exit(1); } screen = DefaultScreen(display); Root = RootWindow(display, screen); d_depth = DefaultDepth(display, screen); x_fd = XConnectionNumber(display); /* Convert XPM to XImage */ GetXPM(&wmgen, pixmap_bytes); /* Create a window to hold the stuff */ mysizehints.flags = USSize | USPosition; mysizehints.x = 0; mysizehints.y = 0; back_pix = GetColor("white"); fore_pix = GetColor("black"); XWMGeometry(display, screen, Geometry, NULL, borderwidth, &mysizehints, &mysizehints.x, &mysizehints.y,&mysizehints.width,&mysizehints.height, &dummy); mysizehints.width = 64; mysizehints.height = 64; win = XCreateSimpleWindow(display, Root, mysizehints.x, mysizehints.y, mysizehints.width, mysizehints.height, borderwidth, fore_pix, back_pix); iconwin = XCreateSimpleWindow(display, win, mysizehints.x, mysizehints.y, mysizehints.width, mysizehints.height, borderwidth, fore_pix, back_pix); /* Activate hints */ XSetWMNormalHints(display, win, &mysizehints); classHint.res_name = wname; classHint.res_class = wname; XSetClassHint(display, win, &classHint); XSelectInput(display, win, ButtonPressMask | ExposureMask | ButtonReleaseMask | PointerMotionMask | StructureNotifyMask); XSelectInput(display, iconwin, ButtonPressMask | ExposureMask | ButtonReleaseMask | PointerMotionMask | StructureNotifyMask); if (XStringListToTextProperty(&wname, 1, &name) == 0) { fprintf(stderr, "%s: can't allocate window name\n", wname); exit(1); } XSetWMName(display, win, &name); /* Create GC for drawing */ gcm = GCForeground | GCBackground | GCGraphicsExposures; gcv.foreground = fore_pix; gcv.background = back_pix; gcv.graphics_exposures = 0; NormalGC = XCreateGC(display, Root, gcm, &gcv); /* ONLYSHAPE ON */ pixmask = XCreateBitmapFromData(display, win, pixmask_bits, pixmask_width, pixmask_height); XShapeCombineMask(display, win, ShapeBounding, 0, 0, pixmask, ShapeSet); XShapeCombineMask(display, iconwin, ShapeBounding, 0, 0, pixmask, ShapeSet); /* ONLYSHAPE OFF */ mywmhints.initial_state = WithdrawnState; mywmhints.icon_window = iconwin; mywmhints.icon_x = mysizehints.x; mywmhints.icon_y = mysizehints.y; mywmhints.window_group = win; mywmhints.flags = StateHint | IconWindowHint | IconPositionHint | WindowGroupHint; XSetWMHints(display, win, &mywmhints); XSetCommand(display, win, argv, argc); XMapWindow(display, win); } asmon-0.71/wmgeneral/misc.o0000644000175000017500000000414410640524261015201 0ustar eevanseevansELF4( UW4EEظ}Ѓ$EEEEEEEEu E]E<\u EJE<"u E7E<'u E$E< t E< u EEUMftEEEEUMEEUfx!Eu EE$EE$}u E U EE4_]U(EEEEUT$$E}tED$E$E}tEuËE$EE$‹E EE#E mE‹EE$Eu֋UEU8ED$ED$E$Eu EE}E$E}u $ E!EME‹EEE9E|׋EEEED$$$ EE܋EGCC: (GNU) 4.1.2 (Ubuntu 4.1.2-0ubuntu4).symtab.strtab.shstrtab.rel.text.data.bss.comment.note.GNU-stack4 %@ +0*9BBI@  \x!(-x;EQb'nsxmisc.cmtablenext_tokenmallocstrdupfreeparse_commandlist_conslist_lengthlist_remove_headexecCommandforkexitexecvp+ D R   B Zx asmon-0.71/wmgeneral/list.c0000640000175000017500000000704506530372763015217 0ustar eevanseevans/* Generic single linked list to keep various information Copyright (C) 1993, 1994 Free Software Foundation, Inc. Author: Kresten Krab Thorup Many modifications by Alfredo K. Kojima This file is part of GNU CC. GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* As a special exception, if you link this library with files compiled with GCC to produce an executable, this does not cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "list.h" #ifdef HAVE_SYS_TYPES_H # include #endif #include /* Return a cons cell produced from (head . tail) */ INLINE LinkedList* list_cons(void* head, LinkedList* tail) { LinkedList* cell; cell = (LinkedList*)malloc(sizeof(LinkedList)); cell->head = head; cell->tail = tail; return cell; } /* Return the length of a list, list_length(NULL) returns zero */ INLINE int list_length(LinkedList* list) { int i = 0; while(list) { i += 1; list = list->tail; } return i; } /* Return the Nth element of LIST, where N count from zero. If N larger than the list length, NULL is returned */ INLINE void* list_nth(int index, LinkedList* list) { while(index-- != 0) { if(list->tail) list = list->tail; else return 0; } return list->head; } /* Remove the element at the head by replacing it by its successor */ INLINE void list_remove_head(LinkedList** list) { if (!*list) return; if ((*list)->tail) { LinkedList* tail = (*list)->tail; /* fetch next */ *(*list) = *tail; /* copy next to list head */ free(tail); /* free next */ } else /* only one element in list */ { free(*list); (*list) = 0; } } /* Remove the element with `car' set to ELEMENT */ /* INLINE void list_remove_elem(LinkedList** list, void* elem) { while (*list) { if ((*list)->head == elem) list_remove_head(list); *list = (*list ? (*list)->tail : NULL); } }*/ INLINE LinkedList * list_remove_elem(LinkedList* list, void* elem) { LinkedList *tmp; if (list) { if (list->head == elem) { tmp = list->tail; free(list); return tmp; } list->tail = list_remove_elem(list->tail, elem); return list; } return NULL; } /* Return element that has ELEM as car */ INLINE LinkedList* list_find(LinkedList* list, void* elem) { while(list) { if (list->head == elem) return list; list = list->tail; } return NULL; } /* Free list (backwards recursive) */ INLINE void list_free(LinkedList* list) { if(list) { list_free(list->tail); free(list); } } /* Map FUNCTION over all elements in LIST */ INLINE void list_mapcar(LinkedList* list, void(*function)(void*)) { while(list) { (*function)(list->head); list = list->tail; } } asmon-0.71/wmgeneral/wmgeneral.h0000640000175000017500000000166406530372763016233 0ustar eevanseevans#ifndef WMGENERAL_H_INCLUDED #define WMGENERAL_H_INCLUDED /***********/ /* Defines */ /***********/ #define MAX_MOUSE_REGION (8) /************/ /* Typedefs */ /************/ typedef struct _rckeys rckeys; struct _rckeys { const char *label; char **var; }; typedef struct { Pixmap pixmap; Pixmap mask; XpmAttributes attributes; } XpmIcon; /*******************/ /* Global variable */ /*******************/ Display *display; /***********************/ /* Function Prototypes */ /***********************/ void AddMouseRegion(int index, int left, int top, int right, int bottom); int CheckMouseRegion(int x, int y); void openXwindow(int argc, char *argv[], char **, char *, int, int); void RedrawWindow(void); void RedrawWindowXY(int x, int y); void copyXPMArea(int, int, int, int, int, int); void copyXBMArea(int, int, int, int, int, int); void setMaskXY(int, int); void parse_rcfile(const char *, rckeys *); #endif asmon-0.71/wmgeneral/list.o0000644000175000017500000000271410640524261015222 0ustar eevanseevansELF|4( U$EUEUE BEUE EE@E}uEUE @t E @E Em}u؋E EEUEtLE@t*E@EEEPQE$E$EU(}tKE;E uE@EE$EE,EPE D$$‹EPEEEEUE;E uEEE@E}uEEU}tE@$E$UE$E ЋE@E}uGCC: (GNU) 4.1.2 (Ubuntu 4.1.2-0ubuntu4).symtab.strtab.shstrtab.rel.text.data.bss.comment.note.GNU-stack4 8%+0*922I   u++'%R=.]?DcUO5_'i&list.clist_consmalloclist_lengthlist_nthlist_remove_headfreelist_remove_elemlist_findlist_freelist_mapcar   /  asmon-0.71/wmgeneral/list.h0000640000175000017500000000352406530372763015222 0ustar eevanseevans/* Generic single linked list to keep various information Copyright (C) 1993, 1994 Free Software Foundation, Inc. Author: Kresten Krab Thorup This file is part of GNU CC. GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* As a special exception, if you link this library with files compiled with GCC to produce an executable, this does not cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __LIST_H_ #define __LIST_H_ #if defined(__GNUC__) && !defined(__STRICT_ANSI__) # define INLINE inline #else # define INLINE #endif typedef struct LinkedList { void *head; struct LinkedList *tail; } LinkedList; INLINE LinkedList* list_cons(void* head, LinkedList* tail); INLINE int list_length(LinkedList* list); INLINE void* list_nth(int index, LinkedList* list); INLINE void list_remove_head(LinkedList** list); INLINE LinkedList *list_remove_elem(LinkedList* list, void* elem); INLINE void list_mapcar(LinkedList* list, void(*function)(void*)); INLINE LinkedList*list_find(LinkedList* list, void* elem); INLINE void list_free(LinkedList* list); #endif asmon-0.71/wmgeneral/misc.h0000640000175000017500000000024506530372763015177 0ustar eevanseevans#ifndef __MISC_H #define __MISC_H #include extern void parse_command(char *, char ***, int *); extern pid_t execCommand(char *); #endif /* __MISC_H */ asmon-0.71/wmgeneral/misc.c0000640000175000017500000000703306530372763015174 0ustar eevanseevans/* dock.c- built-in Dock module for WindowMaker * * WindowMaker window manager * * Copyright (c) 1997 Alfredo K. Kojima * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include "list.h" #include "misc.h" /* *---------------------------------------------------------------------- * parse_command-- * Divides a command line into a argv/argc pair. *---------------------------------------------------------------------- */ #define PRC_ALPHA 0 #define PRC_BLANK 1 #define PRC_ESCAPE 2 #define PRC_DQUOTE 3 #define PRC_EOS 4 #define PRC_SQUOTE 5 typedef struct { short nstate; short output; } DFA; static DFA mtable[9][6] = { {{3,1},{0,0},{4,0},{1,0},{8,0},{6,0}}, {{1,1},{1,1},{2,0},{3,0},{5,0},{1,1}}, {{1,1},{1,1},{1,1},{1,1},{5,0},{1,1}}, {{3,1},{5,0},{4,0},{1,0},{5,0},{6,0}}, {{3,1},{3,1},{3,1},{3,1},{5,0},{3,1}}, {{-1,-1},{0,0},{0,0},{0,0},{0,0},{0,0}}, /* final state */ {{6,1},{6,1},{7,0},{6,1},{5,0},{3,0}}, {{6,1},{6,1},{6,1},{6,1},{5,0},{6,1}}, {{-1,-1},{0,0},{0,0},{0,0},{0,0},{0,0}}, /* final state */ }; char* next_token(char *word, char **next) { char *ptr; char *ret, *t; int state, ctype; t = ret = malloc(strlen(word)+1); ptr = word; state = 0; *t = 0; while (1) { if (*ptr==0) ctype = PRC_EOS; else if (*ptr=='\\') ctype = PRC_ESCAPE; else if (*ptr=='"') ctype = PRC_DQUOTE; else if (*ptr=='\'') ctype = PRC_SQUOTE; else if (*ptr==' ' || *ptr=='\t') ctype = PRC_BLANK; else ctype = PRC_ALPHA; if (mtable[state][ctype].output) { *t = *ptr; t++; *t = 0; } state = mtable[state][ctype].nstate; ptr++; if (mtable[state][0].output<0) { break; } } if (*ret==0) t = NULL; else t = strdup(ret); free(ret); if (ctype==PRC_EOS) *next = NULL; else *next = ptr; return t; } extern void parse_command(char *command, char ***argv, int *argc) { LinkedList *list = NULL; char *token, *line; int count, i; line = command; do { token = next_token(line, &line); if (token) { list = list_cons(token, list); } } while (token!=NULL && line!=NULL); count = list_length(list); *argv = malloc(sizeof(char*)*count); i = count; while (list!=NULL) { (*argv)[--i] = list->head; list_remove_head(&list); } *argc = count; } extern pid_t execCommand(char *command) { pid_t pid; char **argv; int argc; parse_command(command, &argv, &argc); if (argv==NULL) { return 0; } if ((pid=fork())==0) { char **args; int i; args = malloc(sizeof(char*)*(argc+1)); if (!args) exit(10); for (i=0; i */ #include #include #include #include #include #include #include #include #include typedef struct swapent SWAP_ENT_T; typedef struct swaptable SWAP_TABLE_T; typedef unsigned long ULONG; static int err ( char * msg ) { perror(msg); return -1; } int getLoad ( float * load ) { kstat_t * ks; kstat_ctl_t * kc; kstat_named_t * kn; if ((kc = kstat_open()) == NULL) return err("kstat_open"); if ((ks = kstat_lookup(kc, "unix", 0, "system_misc")) == NULL) return err("kstat_lookup"); if (kstat_read(kc, ks, NULL) == -1) return err("kstat_read"); if ((kn = kstat_data_lookup(ks, "avenrun_1min")) == NULL) return err("kstat_data_lookup"); if (kstat_close(kc) == -1) return err("kstat_close"); *load = ((float)kn->value.ul / FSCALE); /* printf("load: %2.2f\n\n", *load); */ return 0; } int getSwap ( ULONG * swapMax, ULONG * swapFree ) { static char buf[256]; int i; int totalSwapEntries; SWAP_TABLE_T * swapTable; SWAP_ENT_T * swapEntries; TRY_AGAIN: totalSwapEntries = swapctl(SC_GETNSWP, 0); swapTable = (SWAP_TABLE_T *)malloc(sizeof(int) + (totalSwapEntries * sizeof(SWAP_ENT_T))); swapTable->swt_n = totalSwapEntries; for (swapEntries = &(swapTable->swt_ent[0]), i = 0; i < totalSwapEntries; i++, swapEntries++) { swapEntries->ste_path = buf; } if (swapctl(SC_LIST, swapTable) == -1) { /* Retry if our swap table was too small else bail */ free(swapTable); perror("swapctl"); if (errno == ENOMEM) goto TRY_AGAIN; else return -1; } for (swapEntries = &(swapTable->swt_ent[0]), *swapMax = *swapFree = 0, i = 0; i < totalSwapEntries; i++, swapEntries++) { if (!(swapEntries->ste_flags & ST_INDEL) && !(swapEntries->ste_flags & ST_DOINGDEL)) { *swapMax += swapEntries->ste_pages; *swapFree += swapEntries->ste_free; } } *swapMax *= sysconf(_SC_PAGESIZE); *swapFree *= sysconf(_SC_PAGESIZE); /* printf("swap max: %ld\nswap free: %ld\nswap used: %ld\n\n", *swapMax, *swapFree, (*swapMax - *swapFree)); */ free(swapTable); return 0; } int getMem ( ULONG * memMax, ULONG * memFree ) { kstat_t * ks; kstat_ctl_t * kc; kstat_named_t * kn; if ((kc = kstat_open()) == NULL) return err("kstat_open"); if ((ks = kstat_lookup(kc, "unix", 0, "system_pages")) == NULL) return err("kstat_lookup"); if (kstat_read(kc, ks, NULL) == -1) return err("kstat_read"); if ((kn = kstat_data_lookup(ks, "physmem")) == NULL) return err("kstat_data_lookup"); *memMax = (kn->value.ul * sysconf(_SC_PAGESIZE)); if ((kn = kstat_data_lookup(ks, "freemem")) == NULL) return err("kstat_data_lookup"); *memFree = (kn->value.ul * sysconf(_SC_PAGESIZE)); if (kstat_close(kc) == -1) return err("kstat_close"); /* printf("mem max: %ld\nmem free: %ld\nmem used: %ld\n\n", *memMax, *memFree, (*memMax - *memFree)); */ return 0; } int getCPU ( ULONG * cpuIdle, ULONG * cpuUser, ULONG * cpuKern, ULONG * cpuWait, ULONG * pageIn, ULONG * pageOut, ULONG * swapIn, ULONG * swapOut ) { cpu_stat_t * cpu_stat; ULONG numCPUs; int i; kstat_t * ks; kstat_ctl_t * kc; kstat_named_t * kn; if ((kc = kstat_open()) == NULL) return err("kstat_open"); if ((ks = kstat_lookup(kc, "unix", 0, "system_misc")) == NULL) return err("kstat_lookup"); if (kstat_read(kc, ks, NULL) == -1) return err("kstat_read"); if ((kn = kstat_data_lookup(ks, "ncpus")) == NULL) return err("kstat_data_lookup"); numCPUs = kn->value.ul; cpu_stat = (cpu_stat_t *)malloc(numCPUs * sizeof(cpu_stat_t)); for (i = 0, ks = kc->kc_chain; ks != NULL; ks = ks->ks_next) { if (strncmp(ks->ks_name, "cpu_stat", 8) == 0) { if (kstat_read(kc, ks, &cpu_stat[i++]) == -1) { free(cpu_stat); return err("kstat_read"); } if (i > numCPUs) { fprintf(stderr, "getCPU: invalid number of cpus in kstat chain\n"); free(cpu_stat); return -1; } } } if (i != numCPUs) { fprintf(stderr, "getCPU: invalid number of cpus in kstat chain\n"); free(cpu_stat); return -1; } for (*cpuIdle = *cpuUser = *cpuKern = *cpuWait = 0, *pageIn = *pageOut = *swapIn = *swapOut = 0, i = 0; i < numCPUs; ++i) { *cpuIdle += cpu_stat[i].cpu_sysinfo.cpu[CPU_IDLE]; *cpuUser += cpu_stat[i].cpu_sysinfo.cpu[CPU_USER]; *cpuKern += cpu_stat[i].cpu_sysinfo.cpu[CPU_KERNEL]; *cpuWait += cpu_stat[i].cpu_sysinfo.cpu[CPU_WAIT]; *pageIn += cpu_stat[i].cpu_vminfo.pgpgin; *pageOut += cpu_stat[i].cpu_vminfo.pgpgout; *swapIn += cpu_stat[i].cpu_vminfo.pgswapin; *swapOut += cpu_stat[i].cpu_vminfo.pgswapout; } if (kstat_close(kc) == -1) { free(cpu_stat); return err("kstat_close"); } /* printf("num cpus: %ld\ncpu idle: %ld\ncpu user: %ld\ncpu kern: %ld\ncpu wait: %ld\npage in: %ld\npage out: %ld\nswap in: %ld\nswap out: %ld\n\n", numCPUs, *cpuIdle, *cpuUser, *cpuKern, *cpuWait, *pageIn, *pageOut, *swapIn, *swapOut); */ free(cpu_stat); return 0; } asmon-0.71/asmon/asmon-mask.xbm0000640000175000017500000000524206655403720016003 0ustar eevanseevans#define asmon_mask_width 64 #define asmon_mask_height 64 static char asmon_mask_bits[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xf0,0xff,0xff,0xff,0xff, 0xff,0xff,0x0f,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xf0,0xff,0xff,0xff, 0xff,0xff,0xff,0x0f,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xf0,0xff,0xff, 0xff,0xff,0xff,0xff,0x0f,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xf0,0xff, 0xff,0xff,0xff,0xff,0xff,0x0f,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xf0, 0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f, 0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff, 0xff,0x0f,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xf0,0xff,0xff,0xff,0xff, 0xff,0xff,0x0f,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xf0,0xff,0xff,0xff, 0xff,0xff,0xff,0x0f,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xf0,0xff,0xff, 0xff,0xff,0xff,0xff,0x0f,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xf0,0xff, 0xff,0xff,0xff,0xff,0xff,0x0f,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xf0, 0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xf0,0xff,0xff,0xff,0xff,0xff, 0xff,0x0f,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xf0,0xff,0xff,0xff,0xff, 0xff,0xff,0x0f,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xf0,0xff,0xff,0xff, 0xff,0xff,0xff,0x0f,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xf0,0xff,0xff, 0xff,0xff,0xff,0xff,0x0f,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xf0,0xff, 0xff,0xff,0xff,0xff,0xff,0x0f,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xf0, 0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff, 0x0f,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xf0,0xff,0xff,0xff,0xff,0xff, 0xff,0x0f,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xf0,0xff,0xff,0xff,0xff, 0xff,0xff,0x0f,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xf0,0xff,0xff,0xff, 0xff,0xff,0xff,0x0f,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xf0,0xff,0xff, 0xff,0xff,0xff,0xff,0x0f,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xf0,0xff, 0xff,0xff,0xff,0xff,0xff,0x0f,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xf0, 0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00}; asmon-0.71/asmon/Makefile0000640000175000017500000000101006735027121014646 0ustar eevanseevans # uncomment the following lines if your using Solaris #SOLARIS = -D__solaris__ #SOLARIS_LIBS = -lsocket -lkstat #SOLARIS_OBJS = solaris26.o LIBDIR = -L/usr/X11R6/lib LIBS = -lXpm -lXext -lX11 $(SOLARIS_LIBS) OBJS = asmon.o $(SOLARIS_OBJS) \ ../wmgeneral/wmgeneral.o \ ../wmgeneral/misc.o \ ../wmgeneral/list.o .c.o: gcc -c -Wall $(SOLARIS) $< -o $*.o asmon: $(OBJS) gcc -o asmon $(OBJS) $(LIBDIR) $(LIBS) clean:: for i in $(OBJS) ; do \ rm $$i;\ done rm asmon install:: cp -f asmon /usr/local/bin asmon-0.71/asmon/asmon.o0000644000175000017500000005612010640524261014520 0ustar eevanseevansELFlD4( L$qUWVQ44B@e M1Dž\DžP@``00Ѓv5`,,Ѓ``DžXX@dd<-qd<D$$ D$ D$D$$D D$ D$GD$$ D$ D$D$$ D$ D$D$$ D$ D$D$$ D$ D$D$$ D$ D$6D$$D$ D$%D$$LD$$ UD$ D$r$UeE1EEEE}t}uE D$E$]}u}uED$E$ED$E$ED$$E|| t-|t8|tFt;$-ED$E$$$$jE}~E$IUWVS\eE1ݝHDž`Dž\DžXDžTD$\ $|ddx0P(H Xp|$ T$L$\$t$D$ D$D$d$d$D$\ $dd2D$l$t `D$D$l$D$l$t \D$D$l$D$l$t XD$D$l$D$l$t TD$D$l$dD$D$l$d$ PHT$L$D$ D$D$d$D$l$t*\D$ `D$D$l$D$'l$t*TD$ XD$D$,l$dD$D$l$Pd$~|Džhehh݄h ݜh݄݅HݝHhh݄ hh~zDžhehh݄h ݜh݄݅HݝHhh݄ hh~݅Hwk݅(݅0݅H@ݝH݅HHw HݝH݅Hٽ f٭۝٭D$D$D$ D$D$T$݅HPٽ f٭۝٭XܥH٭۝٭D$D$D$ T$D$i$D$D$ D$ D$D$.$`9~D$0D$$D$0D$$\9~D$0D$ $D$0D$ $`\X9~D$5D$$D$5D$$T9~D$5D$ $D$5D$ $XTEe3t\[^_]UHD$\ $`E}QED$D$nE$E$@EuzE@Et}E޴ fEm]mExm]mދMEgfffE)‰)‰ЉEUD$D$2D$ D$D$B$MEgfffE)ȉEMEgfffE)‰)‰ЉEUD$D$,D$ D$D$B$D$D$)D$ D$D$B$AMEQE)ȉE} ~Dm UD$D$"D$ D$D$_$>UD$D$"D$ D$D$B$US$eE1D$\ $XX 6XD$D$xt$D$t$t14D$D$t$م4P]D$t$tE4D$D$t$م4PٝPEمPٝTD$t$t44D$D$t$م4PٝHD$t$t44D$D$t$م4PٝDD$t$t44D$D$t$م4Pٝ@D$ t$tH4D$D$t$م4Pٝ8م@م8ٝ c #36C80C, c #3BC30C' c #3FBF0B) c #44BA0B! c #48B60B~ c #4DB10B{ c #51AD0A] c #56A80A^ c #5BA30A/ c #5F9F09( c #649A09_ c #689609: c #6D9109< c #718D08[ c #768808} c #7A8408| c #7F7F071 c #847A072 c #8876073 c #8D71074 c #916D065 c #9668066 c #9A64067 c #9F5F058 c #A35B059 c #A856050 c #AD5105a c #B14D04b c #B64804c c #BA4404d c #BF3F03e c #C33B03f c #C83603g c #CC3203h c #D12D02i c #D62802j c #DA2402k c #DF1F01l c #E31B01m c #E81601n c #EC1201o c #F10D00p c #F50900q c #FA0400r c #30CB00s c #38BE00t c #41B600u c #49AA00v c #59A200w c #619600x c #698E00y c #718200z c #867900A c #8E6D00B c #966500C c #9E5900D c #AE5100E c #B64500F c #BE3C00G c #C73000H c #BF2020I c #B60418J c #283C38K c #F7F3FF ........................................................ .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ .+++++++++++@.+++++++++++++++++++++++++++++++++++++++++@ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++###+++$$$%+%###%+%###%+#$$$#+%###%+%###%+%###%+%###%+%###%++++++ +#+++#+$+++#+$+++#+$+++#+#+++#+#+++$+#+++$+$+++#+#+++#+#+++#+#++++ +%$$$%++$$$%+%###%++###%+%###%+####%+%###%++$$$%+%###%+&###%++++++ +#+++#+$+++#+#+++$+$+++#+$+++#+$+++#+#+++#+$+++#+#+++#+$+++#+#++++ ++###+++$$$#+%###%+%###%++$$$%+%###%+%###%++$$$#+%###%+%###%+++#++ *=-;>,')!~{]^/(_:<[}|1234567890abcdefghijklmnopq rsstuuvvwwxxyzzAABBCCDEEFFGHHHHHHHHHHHHHHHHHHHHHHHHHH +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++,' +$###$+%###+++###%+%###++%###%+%###%+%###%+%$$$%++$$$%++$$$%+,' +#+++#+#+++#+#+++$+#+++#+#+++$+#+++$+#+++$+#+++#+$+++#+$+++#+,' +%###%+%###++%$$$++%$$$%+%###++%###++%$%#%+%###%++$$$%++$$$%+,' +#+++#+#+++#+#+++$+#+++#+#+++$+#+++$+#+++#+#+++#+$+++#+$+++#+,' +%$$$%+%###+++###%+%###++%###%+%$$$++%###%+%$$$%++$$$%+%###%+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +II+ +JJ+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ IKII JJJJ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ IIII JJJJ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ....................................................... .++++++++++++++++++++++++++++++++++++++++++++++++++++++ displayr/var/run/server.0.pid %d/tmp/.X0-lockLinux%d.%d.%dCan't find system name 0.71 asmon %s - by Brad Hall (bkh@rio.vg) originally based on Timecop's wmcpu The top bar: left is the CPU usage, right is the load average The middle bar: left memory usage devided by ticks into shared, buffers, and cached, respectively, and the number of megs used The lower bar: the left swap usage and the number of megs swappedd avg The bottom: the left is a set of LED's marking page's and swap's, the right is a bar representing the amount of memory that the X server is taking up, and the exact megs usage: -display -h this screen -v print the version number -u force asmon to show uptime, rather than X mem use -e cmd execute 'cmd' on mouse click asmon %s /proc/statcpu %lf %lf %lf %lf %lf %lf %lf/proc/vmstatpgpginpgpgin %ldpgpgoutpgpgout %ldpswpinpswpin %ldpswpoutpswpout %ldcpu %lf %lf %lf %lfpagepage %ld %ldswapswap %ld %ld?:@@;@/proc/loadavg%fA{Gzt?Y@/proc/meminfoMemTotalMemTotal: %f kBMemFreeMemFree: %f kBBuffersBuffers: %f kBCachedCached: %f kBSwapTotalSwapTotal: %f kBSwapFreeSwapFree: %f kBMem: %f %f %f %f %f %f Swap: %f %f %fD LABAB@BIA/proc/%d/statusVmSizeVmSize: %ldDAAAA/proc/uptime%dGCC: (GNU) 4.1.2 (Ubuntu 4.1.2-0ubuntu4).symtab.strtab.shstrtab.rel.text.rel.data.bss.rodata.comment.note.GNU-stack4, K( ),D % UX / 3h 4 3<C*EDDULF  I ,@*5 8B@LXY\g`td @.% SP%,=EK<Sz\Y h%Tse|+asmon.casmon_master_xpmasmon_mask_bitshas_kern26cpustat.7281oldv.7412scached.7448sbuffers.7447sshared.7446stotal.7445last_pageinslast_pageoutslast_swapinslast_swapoutsCommandmainusageexitstrncpyprintversionfopenfscanffcloseopenXwindowunamesscanfasmon_routinestderrfwrite__stack_chk_failfprintffputcDrawCPUDrawLoadDrawMemSwapDrawUptimeDrawXmemRedrawWindowXYdisplayXNextEventsystemXCloseDisplayXPendingusleepstrstrfgetscopyXPMAreaDrawLitefeofsprintf]#/4@Q]*NVp~ $@!R"mr#~$"%"#" #"05#:"UZ#_"z#"#"#"#"#"(&5"=EM%'()*+,-.)49/M,T-\0hm-u12z3   3( 6  > L 3b p  x  3   4  , 9 G 3g u  }  3   4  $ b    4 E  5  ; 5o 5z  6 6  66 "B6`6k66$'-HQrz5w555S5ry~43 $3:H Tu3 3 35C O_m3 74Saou2O5 i5|55T5em55P55B5x55555V55565X$83  , 4e   s!5"}"5""""#5\#5#5#5#B$5N$V$$$$5!%5U%5c%t%$%%%%%%'5'5'5(5~(5 )5g)5)53*5g*5*5.+5b+5+5,5Q,5,5  $(,048<@DHLPTX\`dhlptx|  $(,048<@DHLPTX\`dhlptx|  $(,048<@DHLPTX\`dhlptx|  $(asmon-0.71/asmon/asmon.c0000640000175000017500000005132210640524254014501 0ustar eevanseevans#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "../wmgeneral/wmgeneral.h" #include "../wmgeneral/misc.h" #include "asmon-master.xpm" #include "asmon-mask.xbm" #ifdef __solaris__ #include #endif #define EXEC_ON_CLICK 1 #define ASMON_VERSION "0.71" #define CHAR_WIDTH 5 #define CHAR_HEIGHT 7 #define BCHAR_WIDTH 6 #define BCHAR_HEIGHT 9 #define BOFFX (9) #define BOFFY (111) #define BREDX (3) #define BREDY (111) #define BGREENX (87) #define BGREENY (66) #define LITEW (4) #define LITEH (4) #define B_OFF (0) #define B_RED (1) #define B_GREEN (2) /* Evil globals I haven't removed yet */ long last_pageins=0, last_pageouts=0; long last_swapins=0, last_swapouts=0; //double old; static int has_kern26 = 0; #ifdef EXEC_ON_CLICK char Command[256]=""; #endif /* functions */ void DrawUptime(void); void usage(void); void printversion(void); void asmon_routine(int Xpid, int allmem); void DrawLite(int state, int dx, int dy); void DrawCPU(void); void DrawLoad(void); #ifdef __solaris__ float DrawMemSwap(void); extern int getLoad(float *); extern int getSwap(unsigned long *, unsigned long *); extern int getMem(unsigned long *, unsigned long *); extern int getCPU(unsigned long *, unsigned long *, unsigned long *, unsigned long *, unsigned long *, unsigned long *, unsigned long *, unsigned long *); #else void DrawXmem(int Xpid, float total); float DrawMemSwap(float total, int allmem); #endif int main(int argc, char *argv[]) { FILE *fp; int i; int allmem=1; int Xpid=1; char *ProgName; struct utsname name; int kernMajor, kernMinor, kernRev; ProgName = argv[0]; if (strlen(ProgName) >= 5) ProgName += (strlen(ProgName) - 5); for (i=1; i\n"); fprintf(stderr, "\t-h\tthis screen\n"); fprintf(stderr, "\t-v\tprint the version number\n"); #ifndef __solaris__ fprintf(stderr, "\t-u\tforce asmon to show uptime, rather than X mem use\n"); #endif #ifdef EXEC_ON_CLICK fprintf(stderr, "\t-e cmd\texecute 'cmd' on mouse click\n"); #endif fprintf(stderr, "\n"); } /**************************************************************************/ void printversion(void) { fprintf(stderr, "asmon %s\n", ASMON_VERSION); } /**************************************************************************/ void asmon_routine(int Xpid, int allmem) { int xpm_X=0, xpm_Y=0, count=0; XEvent Event; float total=0.0; while(1) { DrawCPU(); DrawLoad(); /* Only run every 15 iterations */ if ( count == 0 || count == 15) #ifdef __solaris__ total=DrawMemSwap(); #else total=DrawMemSwap(total, allmem); #endif #ifdef __solaris__ DrawUptime(); #else /* X mem or Uptime? */ if (Xpid == 0) { DrawUptime(); } else { if (count == 5) DrawXmem(Xpid, total); } #endif /* Redraw Windows */ RedrawWindowXY(xpm_X, xpm_Y); while (XPending(display)) { XNextEvent(display, &Event); switch (Event.type) { #ifdef EXEC_ON_CLICK case ButtonPress: #if 0 fprintf(stderr,"system(%s)\n",Command); #endif if (Command[ 0 ]) system(Command); break; #endif case Expose: RedrawWindowXY(xpm_X, xpm_Y); break; case DestroyNotify: XCloseDisplay(display); exit(0); break; } } count++; if (count > 30) count = 0; usleep(150000); } } /**************************************************************************/ #ifdef __solaris__ /* CPU Usage Meter */ void DrawCPU ( void ) { unsigned long cpuIdle, cpuUser, cpuKern, cpuWait; unsigned long pageIn, pageOut, swapIn, swapOut; /* remember the statistics read last time */ static float cpustat[4] = {0.0, 0.0, 0.0, 0.0}; float fields[4] = {0.0, 0.0, 0.0, 0.0}; float cputotal = 0.0; getCPU(&cpuIdle, &cpuUser, &cpuKern, &cpuWait, &pageIn, &pageOut, &swapIn, &swapOut); // Calculate CPU stuff fields[0] = ((float)cpuIdle - cpustat[0]); cpustat[0] = (float)cpuIdle; cputotal += fields[0]; fields[1] = ((float)cpuUser - cpustat[1]); cpustat[1] = (float)cpuUser; cputotal += fields[1]; fields[2] = ((float)cpuKern - cpustat[2]); cpustat[2] = (float)cpuKern; cputotal += fields[2]; fields[3] = ((float)cpuWait - cpustat[3]); cpustat[3] = (float)cpuWait; cputotal += fields[3]; // CPU Bar if(cputotal > 0) { cputotal = ((cputotal - (fields[0] + fields[2])) * 1.55); if (cputotal > 26) cputotal = 26; copyXPMArea(3, 84, cputotal, 9, 5, 5); copyXPMArea(15, 105, (27 - cputotal), 9, (5 + cputotal), 5); copyXPMArea(16, 46, 2, 14, 32, 2); } // Page In/Out if (pageIn > last_pageins) DrawLite(B_RED, 5, 48); else DrawLite(B_OFF, 5, 48); if (pageOut > last_pageouts) DrawLite(B_RED, 10, 48); else DrawLite(B_OFF, 10, 48); last_pageins = pageIn; last_pageouts = pageOut; // Swap In/Out if (swapIn > last_swapins) DrawLite(B_RED, 5, 53); else DrawLite(B_OFF, 5, 53); if (swapOut > last_swapouts) DrawLite(B_RED, 10, 53); else DrawLite(B_OFF, 10, 53); last_swapins = swapIn; last_swapouts = swapOut; } #else /* CPU Usage Meter */ void DrawCPU(void) { FILE *fp; static double cpustat[7]; /* remember the statistics read last time */ //double fields[7], info[7], cputotal=0.0,idlee=0.0; double fields[7], info[7], cputotal=0.0; long pageins=0, pageouts=0, swapins=0, swapouts=0 ; char buf[128]; int i; if( (fp = fopen("/proc/stat", "r")) != NULL) { if( has_kern26 > 0 ) { // CPU data fscanf(fp, "cpu %lf %lf %lf %lf %lf %lf %lf", info, info+1, info+2, info+3, info+4, info+5, info+6); fclose(fp); if( (fp = fopen("/proc/vmstat", "r")) != NULL) { // gather data for LED's while( fgets(buf, 127, fp) ) { if (strstr(buf, "pgpgin")) sscanf(buf, "pgpgin %ld", &pageins); if (strstr(buf, "pgpgout")) sscanf(buf, "pgpgout %ld", &pageouts); if (strstr(buf, "pswpin")) sscanf(buf, "pswpin %ld", &swapins); if (strstr(buf, "pswpout")) sscanf(buf, "pswpout %ld", &swapouts); } fclose(fp); } } else { // CPU data fscanf(fp, "cpu %lf %lf %lf %lf", info, info+1, info+2, info+3); // gather data for LED's while( fgets(buf, 127, fp) ) { if (strstr(buf, "page")) sscanf(buf, "page %ld %ld", &pageins, &pageouts); if (strstr(buf, "swap")) sscanf(buf, "swap %ld %ld", &swapins, &swapouts); } fclose(fp); } // Calculate CPU stuff if( has_kern26 > 0 ) { for(i = 0; i < 7; i++) { fields[i] = info[i] - cpustat[i]; cputotal += fields[i]; cpustat[i] = info[i]; } } else { for(i = 0; i < 4; i++) { fields[i] = info[i] - cpustat[i]; cputotal += fields[i]; cpustat[i] = info[i]; } } //idlee=info[3]-old; //old=info[3]; // CPU Bar //cputotal = 100 * l1 ; //cputotal=(100-(idlee*100/16))*26/100; if(cputotal > 0) { cputotal = (cputotal-(fields[3]+fields[4]))*1.55; if ( cputotal > 26 ) cputotal = 26; copyXPMArea(3,84,cputotal,9,5,5); copyXPMArea(15,105,(27-cputotal),9,(5+cputotal),5); copyXPMArea(16,46,2,14,32,2); } // Page In/Out if (pageins > last_pageins) { DrawLite(B_RED, 5, 48); } else { DrawLite(B_OFF, 5, 48); } if (pageouts > last_pageouts) { DrawLite(B_RED, 10, 48); } else { DrawLite(B_OFF, 10, 48); } last_pageins = pageins; last_pageouts = pageouts; // Swap In/Out if (swapins > last_swapins) { DrawLite(B_RED, 5, 53); } else { DrawLite(B_OFF, 5, 53); } if (swapouts > last_swapouts) { DrawLite(B_RED, 10, 53); } else { DrawLite(B_OFF, 10, 53); } last_swapins = swapins; last_swapouts = swapouts; } } #endif /**************************************************************************/ /* Load Average */ void DrawLoad(void) { int tempy, tempa, i; static float oldv = -1.0; float ftmp; #ifdef __solaris__ if (getLoad(&ftmp) != -1) { #else FILE *fp; if( (fp = fopen("/proc/loadavg", "r")) != NULL) { fscanf(fp, "%f", &ftmp); fclose(fp); #endif if(oldv != ftmp) { oldv = ftmp; i=ftmp*26; tempa=(ftmp+0.005)*100; tempy=tempa%10; copyXPMArea(3+(tempy*6),66,6,9,50,5); tempy=tempa/10; tempy=tempy%10; copyXPMArea(3+(tempy*6),66,6,9,44,5); copyXPMArea(65,66,3,9,41,5); tempy=tempa/100; if ( tempy > 9 ) { tempy=(tempy-10); copyXPMArea(3+(tempy*6),95,6,9,34,5); } else { copyXPMArea(3+(tempy*6),66,6,9,34,5); } } } } /**************************************************************************/ #ifdef __solaris__ /* Mem/Swap Meter */ float DrawMemSwap ( void ) { unsigned long memMax, memFree, swapMax, swapFree; unsigned long MEMmem, MEMswap; float memUsed, swapUsed; int tempy, tempa; getMem(&memMax, &memFree); memUsed = (float)(memMax - memFree); getSwap(&swapMax, &swapFree); swapUsed = (float)(swapMax - swapFree); /* MEM Meter */ if (memMax == 0) MEMmem = 0; else { if (((float)memMax / 1048576) >= 1) MEMmem = ((memUsed * 31) / (float)memMax); else MEMmem = ((memUsed * 36) / (float)memMax); } // refresh copyXPMArea(4, 115, 55, 11, 4, 18); // Bar copyXPMArea(3, 75, MEMmem, 9, 5, 19); copyXPMArea(15, 105, (36 - MEMmem), 9, (5 + MEMmem), 19); // Numbers tempa = (memUsed / 1048576); tempy = (tempa % 10); copyXPMArea((3 + (tempy * 6)), 66, 6, 9, 50, 19); tempy = ((tempa / 10) % 10); copyXPMArea((3 + (tempy * 6)), 66, 6, 9, 44, 19); tempy = ((tempa / 100) % 10); if (tempy != 0) { copyXPMArea((3 + (tempy * 6)), 66, 6, 9, 38, 19); copyXPMArea(16, 46, 2, 14, 35, 16); } else { copyXPMArea(16, 46, 2, 14, 41, 16); } // refresh copyXPMArea(4, 115, 55, 11, 4, 32); /* SWAP Meter */ if (swapMax == 0) MEMswap = 0; else { if (((float)swapMax / 1048576) >= 1) MEMswap = ((swapUsed * 31) / (float)swapMax); else MEMswap = ((swapUsed * 36) / (float)swapMax); } // Bar copyXPMArea(3, 75, MEMswap, 9, 5, 33); copyXPMArea(15, 105, (36 - MEMswap), 9, (5 + MEMswap), 33); // Numbers tempa = (swapUsed / 1048576); tempy = (tempa % 10); copyXPMArea((3 + (tempy * 6)), 66, 6, 9, 50, 33); tempy = ((tempa / 10) % 10); copyXPMArea((3 + (tempy * 6)), 66, 6, 9, 44, 33); tempy = ((tempa / 100) % 10); if (tempy != 0) { copyXPMArea((3 + (tempy * 6)), 66, 6, 9, 38, 33); copyXPMArea(16, 46, 2, 14, 42, 16); } else { copyXPMArea(16, 46, 2, 14, 41, 30); } return (float)memMax; } #else /* Mem/Swap Meter */ float DrawMemSwap(float total, int allmem) { FILE *fp; if( (fp = fopen("/proc/meminfo", "r")) != NULL) { static float stotal=0.0, sshared=0.0, sbuffers=0.0, scached=0.0; char junk[128]; float used, freeM, shared, buffers, cached, swaptotal, swapused, swapfreeM; unsigned long MEMshar,MEMbuff,MEMcach, MEMswap; int tempy, tempa; if( has_kern26 > 0 ) { float scratch; while(!feof(fp)) { fgets(junk, 120, fp); if (strstr(junk, "MemTotal")) { sscanf(junk, "MemTotal: %f kB", &scratch); total = scratch * 1024; } if (strstr(junk, "MemFree")) { sscanf(junk, "MemFree: %f kB", &scratch); freeM = scratch * 1024; used = total - freeM; } if (strstr(junk, "Buffers")) { sscanf(junk, "Buffers: %f kB", &scratch); buffers = scratch * 1024; } if (strstr(junk, "Cached")) { sscanf(junk, "Cached: %f kB", &scratch); cached = scratch * 1024; } if (strstr(junk, "SwapTotal")) { sscanf(junk, "SwapTotal: %f kB", &scratch); swaptotal = scratch * 1024; } if (strstr(junk, "SwapFree")) { sscanf(junk, "SwapFree: %f kB", &scratch); swapfreeM = scratch * 1024; swapused = swaptotal - swapfreeM; } } } else { fgets(junk, 80, fp); fscanf(fp, "Mem: %f %f %f %f %f %f\nSwap: %f %f %f", &total, &used, &freeM, &shared, &buffers, &cached, &swaptotal, &swapused, &swapfreeM); } fclose(fp); /* All mem areas */ if(stotal != total || sshared != shared || sbuffers != buffers || scached != cached) { stotal = total; sshared = shared; sbuffers = buffers; scached = cached; if ( (total/101048576) >= 1) { MEMshar=((used-buffers-cached)/total)*27; MEMbuff=(buffers/total)*27; MEMcach=(cached/total)*27; } else { MEMshar=((used-buffers-cached)/total)*33; MEMbuff=(buffers/total)*33; MEMcach=(cached/total)*33; } // refresh copyXPMArea(4, 115, 55, 11, 4, 18); // Bar if ( (total/101048576) >= 1) { copyXPMArea(3,75,((used/total)*28),9,5,19); } else { copyXPMArea(3,75,((used/total)*34),9,5,19); } // Separators copyXPMArea(15,105,1,9,5+MEMshar,19); copyXPMArea(15,105,1,9,7+MEMshar+MEMbuff,19); copyXPMArea(15,105,(36-(used/total)*34),9,(5+(used/total)*34),19); // Numbers tempa=used/1048576; tempy=tempa%10; copyXPMArea(3+(tempy*6),66,6,9,50,19); tempy=(tempa/10)%10; copyXPMArea(3+(tempy*6),66,6,9,44,19); tempy=(tempa/100)%10; if ( (total/101048576) >= 1) { copyXPMArea(3+(tempy*6),66,6,9,38,19); copyXPMArea(16,46,2,14,35,16); } else { copyXPMArea(16,46,2,14,41,16); } } /* SWAP Meter */ if ( swaptotal == 0 ) MEMswap = 0; else { if ( (total/101048576) >= 1) MEMswap=(swapused*31)/swaptotal; else MEMswap=(swapused*36)/swaptotal; } // refresh copyXPMArea(4, 115, 55, 11, 4, 32); // Bar copyXPMArea(3,75,MEMswap,9,5,33); copyXPMArea(15,105,(36-(MEMswap)),9,5+MEMswap,33); // Numbers tempa=swapused/1048576; tempy=tempa%10; copyXPMArea(3+(tempy*6),66,6,9,50,33); tempy=(tempa/10)%10; copyXPMArea(3+(tempy*6),66,6,9,44,33); tempy=tempa/100; if ( tempy != 0 ) { copyXPMArea(3+(tempy*6),66,6,9,38,33); copyXPMArea(16,46,2,14,35,30); } else { copyXPMArea(16,46,2,14,41,30); } } return(total); } #endif /**************************************************************************/ #ifndef __solaris__ /* X Mem Usage */ void DrawXmem(int Xpid, float total) { FILE *fp; char buf[128], XFileName[256]; float ratio; long old_Xsize=-1, Xsize=0; sprintf(XFileName, "/proc/%d/status", Xpid); if ((fp = fopen(XFileName, "r")) != NULL) { while( fgets(buf, 127, fp) ) { if (strstr(buf, "VmSize")) sscanf(buf, "VmSize: %ld", &Xsize); } if(old_Xsize!=Xsize) { int tempy, tempa, tempb; old_Xsize=Xsize; ratio=Xsize/(total/1024); if ( Xsize > (total/1024) ) Xsize=total/1024; Xsize=Xsize/1024; tempy=Xsize%10; copyXPMArea(3+(tempy*6),66,6,9,50,48); tempa=Xsize/10; tempy=tempa%10; tempb=Xsize/100; if ( Xsize > 100 ) { copyXPMArea(3,84,((ratio)*17),11,18,47); copyXPMArea(15,105,(23-((ratio)*17)),11,(18+(ratio*22)),47); copyXPMArea(3+(tempy*6),66,6,9,44,48); copyXPMArea(3+(tempb*6),66,6,9,38,48); copyXPMArea(16,46,2,14,36,46); } else { copyXPMArea(3,84,((ratio)*22),11,18,47); copyXPMArea(15,105,(23-((ratio)*22)),11,(18+(ratio*22)),47); copyXPMArea(3+(tempy*6),66,6,9,44,48); copyXPMArea(16,46,2,14,41,46); } } fclose(fp); } } #endif /**************************************************************************/ /* Uptime */ void DrawUptime(void) { int upt, days=0,hours=0,mins=0, old_mins=-1,old_hours=-1; #ifdef __solaris__ struct utmp * pUtmp; struct utmp idUtmp; idUtmp.ut_type = BOOT_TIME; setutent(); pUtmp = getutid(&idUtmp); upt = (time(0) - pUtmp->ut_time); #else FILE *fp; if( (fp = fopen("/proc/uptime", "r")) != NULL) fscanf(fp, "%d",&upt); fclose(fp); #endif mins=(upt/60)%60; hours=(upt/3600)%24; days=(upt/86400); if(old_hours!=hours) old_hours=hours; if(old_mins!=mins) { int tempy; old_mins=mins; if ( days > 9 ) { copyXPMArea(20,105,36,9,18,48); tempy=hours%10; copyXPMArea(3+(tempy*6),66,6,9,50,48); tempy=hours/10; copyXPMArea(3+(tempy*6),66,6,9,44,48); copyXPMArea(63,66,3,9,41,48); tempy=days%10; copyXPMArea(3+(tempy*6),66,6,9,34,48); tempy=(days/10)%10; copyXPMArea(3+(tempy*6),66,6,9,28,48); tempy=days/100; copyXPMArea(3+(tempy*6),66,6,9,22,48); } else { tempy=mins%10; copyXPMArea(3+(tempy*6),66,6,9,50,48); tempy=mins/10; copyXPMArea(3+(tempy*6),66,6,9,44,48); copyXPMArea(63,66,3,9,41,48); tempy=hours%10; copyXPMArea(3+(tempy*6),66,6,9,34,48); tempy=hours/10; copyXPMArea(3+(tempy*6),66,6,9,28,48); copyXPMArea(63,66,3,9,25,48); tempy=days%10; copyXPMArea(3+(tempy*6),66,6,9,18,48); } } } /**************************************************************************/ /* Drawing LED's */ void DrawLite(int state, int dx, int dy) { switch(state) { case B_RED: copyXPMArea(BREDX, BREDY, LITEW, LITEH, dx, dy); break; case B_GREEN: copyXPMArea(BGREENX, BGREENY, LITEW, LITEH, dx, dy); break; default: case B_OFF: copyXPMArea(BOFFX, BOFFY, LITEW, LITEH, dx, dy); break; } } /* EOF */ asmon-0.71/asmon/asmon-master.xpm0000640000175000017500000002562206735025566016374 0ustar eevanseevans/* XPM */ static char * asmon_master_xpm[] = { "75 126 76 1", " c None", ". c #000000", "+ c #202020", "@ c #C7C7C7", "# c #20B2AE", "$ c #004941", "% c #188A86", "& c #107D79", "* c #24DA0D", "= c #28D60D", "- c #2DD10D", "; c #32CC0C", "> c #36C80C", ", c #3BC30C", "' c #3FBF0B", ") c #44BA0B", "! c #48B60B", "~ c #4DB10B", "{ c #51AD0A", "] c #56A80A", "^ c #5BA30A", "/ c #5F9F09", "( c #649A09", "_ c #689609", ": c #6D9109", "< c #718D08", "[ c #768808", "} c #7A8408", "| c #7F7F07", "1 c #847A07", "2 c #887607", "3 c #8D7107", "4 c #916D06", "5 c #966806", "6 c #9A6406", "7 c #9F5F05", "8 c #A35B05", "9 c #A85605", "0 c #AD5105", "a c #B14D04", "b c #B64804", "c c #BA4404", "d c #BF3F03", "e c #C33B03", "f c #C83603", "g c #CC3203", "h c #D12D02", "i c #D62802", "j c #DA2402", "k c #DF1F01", "l c #E31B01", "m c #E81601", "n c #EC1201", "o c #F10D00", "p c #F50900", "q c #FA0400", "r c #30CB00", "s c #38BE00", "t c #41B600", "u c #49AA00", "v c #59A200", "w c #619600", "x c #698E00", "y c #718200", "z c #867900", "A c #8E6D00", "B c #966500", "C c #9E5900", "D c #AE5100", "E c #B64500", "F c #BE3C00", "G c #C73000", "H c #BF2020", "I c #B60418", "J c #283C38", "K c #F7F3FF", " ", " ", " ", " ", " ........................................................ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", " ", " ", " ........................................................ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", " ", " ", " ........................................................ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ", " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", " ", " ", " ........................................................ ", " .+++++++++++@.+++++++++++++++++++++++++++++++++++++++++@ ", " .+++++++++++@.+++++++++++++++++++++++++++++++++++++++++@ ", " .+++++++++++@.+++++++++++++++++++++++++++++++++++++++++@ ", " .+++++++++++@.+++++++++++++++++++++++++++++++++++++++++@ ", " .+++++++++++@.+++++++++++++++++++++++++++++++++++++++++@ ", " .+++++++++++@.+++++++++++++++++++++++++++++++++++++++++@ ", " .+++++++++++@.+++++++++++++++++++++++++++++++++++++++++@ ", " .+++++++++++@.+++++++++++++++++++++++++++++++++++++++++@ ", " .+++++++++++@.+++++++++++++++++++++++++++++++++++++++++@ ", " .+++++++++++@.+++++++++++++++++++++++++++++++++++++++++@ ", " .+++++++++++@.+++++++++++++++++++++++++++++++++++++++++@ ", " .+++++++++++@.+++++++++++++++++++++++++++++++++++++++++@ ", " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", " ", " ", " ", " ", " ", " ", " ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", " ++###+++$$$%+%###%+%###%+#$$$#+%###%+%###%+%###%+%###%+%###%++++++ ", " +#+++#+$+++#+$+++#+$+++#+#+++#+#+++$+#+++$+$+++#+#+++#+#+++#+#++++ ", " +#+++#+$+++#+$+++#+$+++#+#+++#+#+++$+#+++$+$+++#+#+++#+#+++#+#++++ ", " +%$$$%++$$$%+%###%++###%+%###%+####%+%###%++$$$%+%###%+&###%++++++ ", " +#+++#+$+++#+#+++$+$+++#+$+++#+$+++#+#+++#+$+++#+#+++#+$+++#+#++++ ", " +#+++#+$+++#+#+++$+$+++#+$+++#+$+++#+#+++#+$+++#+#+++#+$+++#+#++++ ", " ++###+++$$$#+%###%+%###%++$$$%+%###%+%###%++$$$#+%###%+%###%+++#++ ", " ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", " *=-;>,')!~{]^/(_:<[}|1234567890abcdefghijklmnopq ", " *=-;>,')!~{]^/(_:<[}|1234567890abcdefghijklmnopq ", " *=-;>,')!~{]^/(_:<[}|1234567890abcdefghijklmnopq ", " *=-;>,')!~{]^/(_:<[}|1234567890abcdefghijklmnopq ", " *=-;>,')!~{]^/(_:<[}|1234567890abcdefghijklmnopq ", " *=-;>,')!~{]^/(_:<[}|1234567890abcdefghijklmnopq ", " *=-;>,')!~{]^/(_:<[}|1234567890abcdefghijklmnopq ", " *=-;>,')!~{]^/(_:<[}|1234567890abcdefghijklmnopq ", " *=-;>,')!~{]^/(_:<[}|1234567890abcdefghijklmnopq ", " rsstuuvvwwxxyzzAABBCCDEEFFGHHHHHHHHHHHHHHHHHHHHHHHHHH ", " rsstuuvvwwxxyzzAABBCCDEEFFGHHHHHHHHHHHHHHHHHHHHHHHHHH ", " rsstuuvvwwxxyzzAABBCCDEEFFGHHHHHHHHHHHHHHHHHHHHHHHHHH ", " rsstuuvvwwxxyzzAABBCCDEEFFGHHHHHHHHHHHHHHHHHHHHHHHHHH ", " rsstuuvvwwxxyzzAABBCCDEEFFGHHHHHHHHHHHHHHHHHHHHHHHHHH ", " rsstuuvvwwxxyzzAABBCCDEEFFGHHHHHHHHHHHHHHHHHHHHHHHHHH ", " rsstuuvvwwxxyzzAABBCCDEEFFGHHHHHHHHHHHHHHHHHHHHHHHHHH ", " rsstuuvvwwxxyzzAABBCCDEEFFGHHHHHHHHHHHHHHHHHHHHHHHHHH ", " rsstuuvvwwxxyzzAABBCCDEEFFGHHHHHHHHHHHHHHHHHHHHHHHHHH ", " rsstuuvvwwxxyzzAABBCCDEEFFGHHHHHHHHHHHHHHHHHHHHHHHHHH ", " rsstuuvvwwxxyzzAABBCCDEEFFGHHHHHHHHHHHHHHHHHHHHHHHHHH ", " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++,' ", " +$###$+%###+++###%+%###++%###%+%###%+%###%+%$$$%++$$$%++$$$%+,' ", " +#+++#+#+++#+#+++$+#+++#+#+++$+#+++$+#+++$+#+++#+$+++#+$+++#+,' ", " +#+++#+#+++#+#+++$+#+++#+#+++$+#+++$+#+++$+#+++#+$+++#+$+++#+,' ", " +%###%+%###++%$$$++%$$$%+%###++%###++%$%#%+%###%++$$$%++$$$%+,' ", " +#+++#+#+++#+#+++$+#+++#+#+++$+#+++$+#+++#+#+++#+$+++#+$+++#+,' ", " +#+++#+#+++#+#+++$+#+++#+#+++$+#+++$+#+++#+#+++#+$+++#+$+++#+,' ", " +%$$$%+%###+++###%+%###++%###%+%$$$++%###%+%$$$%++$$$%+%###%+ ", " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", " ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", " ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", " ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", " ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", " ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", " ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", " ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", " +II+ +JJ+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", " IKII JJJJ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", " IIII JJJJ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", " +II+ +JJ+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", " ....................................................... ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", " .++++++++++++++++++++++++++++++++++++++++++++++++++++++ "}; asmon-0.71/asmon/asmon0000755000175000017500000010646510640524261014276 0ustar eevanseevansELFp4r4 ($!444aaaH  a((( Qtd/lib/ld-linux.so.2GNU%<+ 1/0:-*&3 2'5)!9.  87 " #$%,6;(45 @ 57;|CEK8qX4=  d}-yR9" :v :y>SH9>r2(30_i$3O FB:F]qV4k$0:!WJfL] p j(libXpm.so.4__gmon_start___Jv_RegisterClassesXCreateGCXParseColorXAllocColorXpmCreatePixmapFromData_fini_initlibXext.so.6XShapeCombineMasklibX11.so.6XGetWindowAttributesXSetWMHintsXCreateBitmapFromDataXNextEventXMapWindowXCheckTypedWindowEventXSetWMNormalHintsXSetWMNameXSetClassHintXStringListToTextPropertyXPendingXCopyAreaXSetCommandXSelectInputXWMGeometryXDisplayNameXOpenDisplayXConnectionNumberXCloseDisplayXCreateSimpleWindowlibc.so.6_IO_stdin_usedexitsprintffopenstrncpyfork__stack_chk_failstrspnstrdupfeoffgetsstrstrstrcspnfputcfclosemallocsscanfstderrsystemfscanfexecvpusleepfwritefprintfuname__libc_start_mainfree_edata__bss_start_endGLIBC_2.4GLIBC_2.1GLIBC_2.0ii ii ii  8      $(,048<@DHLPT X!\"`#d$h%l&p't(x)|*+,-./01234UqC5%%h%h%h%h%h %h(%h0%h8p%h@`%hHP%hP@%hX0% h` %hh%hp%hx%h% h%$h%(h%,h%0h%4h%8hp%<h`%@hP%Dh@%Hh0%Lh %Ph%Th%Xh%\h%`h%dh%hh%lh %ph(%th0%xh8p%|h@`%hHP%hP@%hX0%h` %hh%hp%hx%h%h%h1^PTRhhQVh/US[0ctX[ÐU=$t ҡu$ÐUtt $ÐL$qUWVQ44B@e M1Dž\DžP@``00Ѓv5`,,Ѓ``DžXX@dd<-qd<D$$T D$ D$D$$ D$ D$GD$$ D$ D$D$$` D$ D$D$$y D$ D$D$$5T D$ D$D$$F/ D$ D$6D$$d D$ D$%D$$ D$$ 0U D$D$$UeE1EEEEQ}t}uE D$E$ ]}u}uED$E$ED$E$J*ED$$E|| t-|t8|tF t;$ -ED$E$)$$$jE}~E$I~UWVS\eE1ݝHDž`Dž\DžXDžTD$$ddPx0P(H Xp|$ T$L$\$t$D$ D$D$d$`d$D$$dd2D$l$Pt `D$D$ l$D$l$t \D$D$l$D$+l$t XD$D$2l$hD$=l$t TD$D$El$.dD$D$l$d$x PHT$L$D$ D$D$Qd$D$el$t*\D$ `D$D$jl$cD$wl$t*TD$ XD$D$|l$dD$D$l$Pd$iP~|Džhehh݄h`ݜh݄݅HݝHhh݄`hh~zDžhehh݄h`ݜh݄݅HݝHhh݄`hh~݅Hwk݅(݅0݅HݝH݅Hw ݝH݅Hٽ f٭۝٭D$D$D$ D$D$T$&݅Hٽ f٭۝٭ܥH٭۝٭D$D$D$ T$D$i$(&D$D$ D$ D$D$.$%`@9~D$0D$$7D$0D$$\D9~D$0D$ $D$0D$ $`@\DXH9~D$5D$$D$5D$$qTL9~D$5D$ $FD$5D$ $(XHTLEe3tx\[^_]UHD$$E}QED$D$E$E$1 EuzE E}E޴ fEm]mEm]mދMEgfffE)‰)‰ЉEUD$D$2D$ D$D$B$u#MEgfffE)ȉEMEgfffE)‰)‰ЉEUD$D$,D$ D$D$B$"D$D$)D$ D$D$B$A"MEQE)ȉE} ~Dm UD$D$"D$ D$D$_$P">UD$D$"D$ D$D$B$"US$eE1D$$XX P6XD$D$xt$D$t$Ot14D$D$t$م4]D$t$tE4D$D$t$م4ٝPEمPٝTD$t$t44D$D$t$1م4ٝHD$-t$Wt44D$D$4t$م4ٝDD$Bt$ t44D$D$Lt$م4ٝ@D$]t$tH4D$D$ft$Gم4ٝ8م@م8ٝ c #36C80C, c #3BC30C' c #3FBF0B) c #44BA0B! c #48B60B~ c #4DB10B{ c #51AD0A] c #56A80A^ c #5BA30A/ c #5F9F09( c #649A09_ c #689609: c #6D9109< c #718D08[ c #768808} c #7A8408| c #7F7F071 c #847A072 c #8876073 c #8D71074 c #916D065 c #9668066 c #9A64067 c #9F5F058 c #A35B059 c #A856050 c #AD5105a c #B14D04b c #B64804c c #BA4404d c #BF3F03e c #C33B03f c #C83603g c #CC3203h c #D12D02i c #D62802j c #DA2402k c #DF1F01l c #E31B01m c #E81601n c #EC1201o c #F10D00p c #F50900q c #FA0400r c #30CB00s c #38BE00t c #41B600u c #49AA00v c #59A200w c #619600x c #698E00y c #718200z c #867900A c #8E6D00B c #966500C c #9E5900D c #AE5100E c #B64500F c #BE3C00G c #C73000H c #BF2020I c #B60418J c #283C38K c #F7F3FF ........................................................ .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ .+++++++++++@.+++++++++++++++++++++++++++++++++++++++++@ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++###+++$$$%+%###%+%###%+#$$$#+%###%+%###%+%###%+%###%+%###%++++++ +#+++#+$+++#+$+++#+$+++#+#+++#+#+++$+#+++$+$+++#+#+++#+#+++#+#++++ +%$$$%++$$$%+%###%++###%+%###%+####%+%###%++$$$%+%###%+&###%++++++ +#+++#+$+++#+#+++$+$+++#+$+++#+$+++#+#+++#+$+++#+#+++#+$+++#+#++++ ++###+++$$$#+%###%+%###%++$$$%+%###%+%###%++$$$#+%###%+%###%+++#++ *=-;>,')!~{]^/(_:<[}|1234567890abcdefghijklmnopq rsstuuvvwwxxyzzAABBCCDEEFFGHHHHHHHHHHHHHHHHHHHHHHHHHH +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++,' +$###$+%###+++###%+%###++%###%+%###%+%###%+%$$$%++$$$%++$$$%+,' +#+++#+#+++#+#+++$+#+++#+#+++$+#+++$+#+++$+#+++#+$+++#+$+++#+,' +%###%+%###++%$$$++%$$$%+%###++%###++%$%#%+%###%++$$$%++$$$%+,' +#+++#+#+++#+#+++$+#+++#+#+++$+#+++$+#+++#+#+++#+$+++#+$+++#+,' +%$$$%+%###+++###%+%###++%###%+%$$$++%###%+%$$$%++$$$%+%###%+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +II+ +JJ+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ IKII JJJJ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ IIII JJJJ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ....................................................... .++++++++++++++++++++++++++++++++++++++++++++++++++++++ displayr/var/run/server.0.pid %d/tmp/.X0-lockLinux%d.%d.%dCan't find system name 0.71 asmon %s - by Brad Hall (bkh@rio.vg) originally based on Timecop's wmcpu The top bar: left is the CPU usage, right is the load average The middle bar: left memory usage devided by ticks into shared, buffers, and cached, respectively, and the number of megs used The lower bar: the left swap usage and the number of megs swappedd avg The bottom: the left is a set of LED's marking page's and swap's, the right is a bar representing the amount of memory that the X server is taking up, and the exact megs usage: -display -h this screen -v print the version number -u force asmon to show uptime, rather than X mem use -e cmd execute 'cmd' on mouse click asmon %s /proc/statcpu %lf %lf %lf %lf %lf %lf %lf/proc/vmstatpgpginpgpgin %ldpgpgoutpgpgout %ldpswpinpswpin %ldpswpoutpswpout %ldcpu %lf %lf %lf %lfpagepage %ld %ldswapswap %ld %ld?:@@;@/proc/loadavg%fA{Gzt?Y@/proc/meminfoMemTotalMemTotal: %f kBMemFreeMemFree: %f kBBuffersBuffers: %f kBCachedCached: %f kBSwapTotalSwapTotal: %f kBSwapFreeSwapFree: %f kBMem: %f %f %f %f %f %f Swap: %f %f %fD LABAB@BIA/proc/%d/statusVmSizeVmSize: %ldDAAAA/proc/uptime%d : r# Not enough free colorcells. wm.app: can't parse %s. wm.app: can't allocate %s. -display%s: can't open display %s whiteblack%s: can't allocate window name v  (HoԂԆ  po0ooFVfvƌ֌&6FVfvƍ֍&6FVfvƎ֎&6FVfP\eq} %1=IUamy !-9EQ]iu)5AMYeq}8888hLh000000000|||||||||||``D(t( XXXXXXXXXXGCC: (GNU) 4.1.2 (Ubuntu 4.1.2-0ubuntu4)GCC: (GNU) 4.1.2 (Ubuntu 4.1.2-0ubuntu4)GCC: (GNU) 4.1.2 (Ubuntu 4.1.2-0ubuntu4)GCC: (GNU) 4.1.2 (Ubuntu 4.1.2-0ubuntu4)GCC: (GNU) 4.1.2 (Ubuntu 4.1.2-0ubuntu4)GCC: (GNU) 4.1.2 (Ubuntu 4.1.2-0ubuntu4)GCC: (GNU) 4.1.2 (Ubuntu 4.1.2-0ubuntu4)GCC: (GNU) 4.1.2 (Ubuntu 4.1.2-0ubuntu4)GCC: (GNU) 4.1.2 (Ubuntu 4.1.2-0ubuntu4)GCC: (GNU) 4.1.2 (Ubuntu 4.1.2-0ubuntu4),& ($-@!y_IO_stdin_used{[ChVEint5Q:[LLOB'/build/buildd/glibc-2.5/build-tree/i386-libc/csu/crti.S/build/buildd/glibc-2.5/build-tree/glibc-2.5/csuGNU AS 2.17.50T(/build/buildd/glibc-2.5/build-tree/i386-libc/csu/crtn.S/build/buildd/glibc-2.5/build-tree/glibc-2.5/csuGNU AS 2.17.50% $ > $ > 4: ; I?  &IU%U%# init.cN /build/buildd/glibc-2.5/build-tree/i386-libc/csucrti.S !/!=Z!gg//Z!!!#!/=(3!/!=Z!vN /build/buildd/glibc-2.5/build-tree/i386-libc/csucrtn.S- !@!!!init.cshort intGNU C 4.1.2 (Ubuntu 4.1.2-0ubuntu4)long long intunsigned charlong long unsigned intshort unsigned int/build/buildd/glibc-2.5/build-tree/glibc-2.5/csu_IO_stdin_used#(;-/@D.symtab.strtab.shstrtab.interp.note.ABI-tag.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rel.dyn.rel.plt.init.text.fini.rodata.eh_frame.ctors.dtors.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_pubnames.debug_info.debug_abbrev.debug_line.debug_str.debug_ranges#(( 5HH1oԂ@; CԆKo xXo00 @g pp p   y t00 @pp@((PHHPaaaaabbcX  k klXm%=mnfPo= 0p+HqHq9lx #L (HԂԆ0p   0 p (H   (/:r $  " /8px, P`8  E _ @&-CTgp {z 4 l  p L=  Hx '$1 > HJ(P}buym  9  :". @$H(L:Y>kLz< , D{l S K& @c !9, 5>B T/] ew+ 2'  i = D 3B% ,6_HU$hz) F gP $' )5[ BG$P`HmT x5  q4$y  !(;WM]@jr~ f  abi-note.S../sysdeps/i386/elf/start.Sinit.cinitfini.c/build/buildd/glibc-2.5/build-tree/i386-libc/csu/crti.Scall_gmon_startcrtstuff.c__CTOR_LIST____DTOR_LIST____JCR_LIST__completed.5758p.5756__do_global_dtors_auxframe_dummy__CTOR_END____DTOR_END____FRAME_END____JCR_END____do_global_ctors_aux/build/buildd/glibc-2.5/build-tree/i386-libc/csu/crtn.Sasmon.casmon_master_xpmasmon_mask_bitshas_kern26cpustat.7281oldv.7412scached.7448sbuffers.7447sshared.7446stotal.7445wmgeneral.cGetXPMGetColorflush_exposemisc.cmtablelist.c_GLOBAL_OFFSET_TABLE___init_array_end__init_array_start_DYNAMICdata_startDrawLoadsprintf@@GLIBC_2.0execCommandscreencopyXBMArea__libc_csu_fini_startlast_swapoutsXCheckTypedWindowEvent__gmon_start___Jv_RegisterClasses_fp_hwnext_tokenmywmhintsparse_rcfilemysizehints_finisystem@@GLIBC_2.0strncpy@@GLIBC_2.0fgets@@GLIBC_2.0DrawMemSwapXpmCreatePixmapFromDatamouse_regionXSetWMNormalHints__libc_start_main@@GLIBC_2.0XSetClassHintfore_pixXCreateSimpleWindowuname@@GLIBC_2.0XWMGeometryXConnectionNumberpixmaskwinXOpenDisplayusleep@@GLIBC_2.0_IO_stdin_usedDrawCPUfree@@GLIBC_2.0x_fdXCopyArea__data_startXCloseDisplayopenXwindowlast_pageoutscopyXPMAreasetMaskXYfclose@@GLIBC_2.1list_mapcarwmgenlist_remove_elemXSetWMNameDrawLiteXDisplayNamestderr@@GLIBC_2.0list_remove_headexecvp@@GLIBC_2.0list_consfopen@@GLIBC_2.1XNextEventdisplaylist_lengthCommand__dso_handlefeof@@GLIBC_2.0__libc_csu_initXMapWindowlist_nthRedrawWindowXYXCreateBitmapFromDataprintversionXCreateGCfwrite@@GLIBC_2.0XSelectInputfprintf@@GLIBC_2.0strstr@@GLIBC_2.0AddMouseRegion__bss_startmalloc@@GLIBC_2.0__stack_chk_fail@@GLIBC_2.4fputc@@GLIBC_2.0d_depthparse_commandXShapeCombineMaskXParseColorNormalGCasmon_routinelist_freeXAllocColorRedrawWindow_endGeometryfork@@GLIBC_2.0last_swapinsDrawUptimeXSetCommandlist_findusageXGetWindowAttributesstrspn@@GLIBC_2.0sscanf@@GLIBC_2.0fscanf@@GLIBC_2.0back_pixXStringListToTextPropertyDrawXmemRootCheckMouseRegion_edatastrcspn@@GLIBC_2.0strdup@@GLIBC_2.0exit@@GLIBC_2.0last_pageinsiconwinXSetWMHints__i686.get_pc_thunk.bxXPendingmain_init