Mercurial > hg > xemacs-beta
comparison man/lispref/os.texi @ 280:7df0dd720c89 r21-0b38
Import from CVS: tag r21-0b38
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:32:22 +0200 |
parents | 376386a54a3c |
children | c9fe270a4101 |
comparison
equal
deleted
inserted
replaced
279:c20b2fb5bb0a | 280:7df0dd720c89 |
---|---|
721 when Emacs can't find those directories in their standard installed | 721 when Emacs can't find those directories in their standard installed |
722 locations, but can find them in a directory related somehow to the one | 722 locations, but can find them in a directory related somehow to the one |
723 containing the Emacs executable. | 723 containing the Emacs executable. |
724 @end defvar | 724 @end defvar |
725 | 725 |
726 @defun load-average | 726 @defun load-average &optional use-floats |
727 This function returns the current 1-minute, 5-minute and 15-minute | 727 This function returns a list of the current 1-minute, 5-minute and |
728 load averages in a list. The values are integers that are 100 times | 728 15-minute load averages. The values are integers that are 100 times the |
729 the system load averages. (The load averages indicate the number of | 729 system load averages. (The load averages indicate the number of |
730 processes trying to run.) | 730 processes trying to run.) |
731 | 731 |
732 When @var{use-floats} is non-@code{nil}, floats will be returned instead | |
733 of integers. These floats are not multiplied by 100. | |
734 | |
732 @example | 735 @example |
733 @group | 736 @group |
734 (load-average) | 737 (load-average) |
735 @result{} (169 48 36) | 738 @result{} (169 158 164) |
739 (load-average t) | |
740 @result{} (1.69921875 1.58984375 1.640625) | |
736 @end group | 741 @end group |
737 | 742 |
738 @group | 743 @group |
739 lewis@@rocky[5] % uptime | 744 lewis@@rocky[5] % uptime |
740 11:55am up 1 day, 19:37, 3 users, | 745 8:06pm up 16 day(s), 21:57, 40 users, |
741 load average: 1.69, 0.48, 0.36 | 746 load average: 1.68, 1.59, 1.64 |
742 @end group | 747 @end group |
743 @end example | 748 @end example |
749 | |
750 If the 5-minute or 15-minute load averages are not available, return a | |
751 shortened list, containing only those averages which are available. | |
752 | |
753 On some systems, this function may require special privileges to run, or | |
754 it may be unimplemented for the particular system type. In that case, | |
755 the function will signal an error. | |
744 @end defun | 756 @end defun |
745 | 757 |
746 @defun emacs-pid | 758 @defun emacs-pid |
747 This function returns the process @sc{id} of the Emacs process. | 759 This function returns the process @sc{id} of the Emacs process. |
748 @end defun | 760 @end defun |
790 This function returns the user name corresponding to Emacs's real | 802 This function returns the user name corresponding to Emacs's real |
791 @sc{uid}. This ignores the effective @sc{uid} and ignores the | 803 @sc{uid}. This ignores the effective @sc{uid} and ignores the |
792 environment variables @code{LOGNAME} and @code{USER}. | 804 environment variables @code{LOGNAME} and @code{USER}. |
793 @end defun | 805 @end defun |
794 | 806 |
795 @defun user-full-name | 807 @defvar user-full-name |
796 This function returns the full name of the user. | 808 This variable holds the name of the user running this Emacs. It is |
809 initialized at startup time from the value of @code{NAME} environment | |
810 variable. You can change the value of this variable to alter the result | |
811 of the @code{user-full-name} function. | |
812 @end defvar | |
813 | |
814 @defun user-full-name &optional user | |
815 This function returns the full name of @var{user}. If @var{user} is | |
816 @code{nil}, it defaults to the user running this Emacs. In that case, | |
817 the value of @code{user-full-name} variable, if non-@code{nil}, will be | |
818 used. | |
819 | |
820 If @var{user} is specified explicitly, @code{user-full-name} variable is | |
821 ignored. | |
797 | 822 |
798 @example | 823 @example |
799 @group | 824 @group |
800 (user-full-name) | 825 (user-full-name) |
801 @result{} "Bil Lewis" | 826 @result{} "Hrvoje Niksic" |
827 (setq user-full-name "Hrvoje \"Niksa\" Niksic") | |
828 (user-full-name) | |
829 @result{} "Hrvoje \"Niksa\" Niksic" | |
830 (user-full-name "hniksic") | |
831 @result{} "Hrvoje Niksic" | |
802 @end group | 832 @end group |
803 @end example | 833 @end example |
804 @end defun | 834 @end defun |
805 | 835 |
806 @vindex user-full-name | 836 @vindex user-full-name |
908 to strings or to calendrical information. There is also a function to | 938 to strings or to calendrical information. There is also a function to |
909 convert calendrical information to a time value. You can get time | 939 convert calendrical information to a time value. You can get time |
910 values from the functions @code{current-time} (@pxref{Time of Day}) and | 940 values from the functions @code{current-time} (@pxref{Time of Day}) and |
911 @code{file-attributes} (@pxref{File Attributes}). | 941 @code{file-attributes} (@pxref{File Attributes}). |
912 | 942 |
913 @defun format-time-string format-string time | 943 @defun format-time-string format-string &optional time |
914 This function converts @var{time} to a string according to | 944 This function converts @var{time} to a string according to |
915 @var{format-string}. The argument @var{format-string} may contain | 945 @var{format-string}. If @var{time} is omitted, it defaults to the |
946 current time. The argument @var{format-string} may contain | |
916 @samp{%}-sequences which say to substitute parts of the time. Here is a | 947 @samp{%}-sequences which say to substitute parts of the time. Here is a |
917 table of what the @samp{%}-sequences mean: | 948 table of what the @samp{%}-sequences mean: |
918 | 949 |
919 @table @samp | 950 @table @samp |
920 @item %a | 951 @item %a |