~rdoering/ubuntu/karmic/erlang/fix-535090

« back to all changes in this revision

Viewing changes to lib/os_mon/doc/src/nteventlog.xml

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-02-15 16:42:52 UTC
  • mfrom: (3.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090215164252-q5x4rcf8a5pbesb1
Tags: 1:12.b.5-dfsg-2
Upload to unstable after lenny is released.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="latin1" ?>
 
2
<!DOCTYPE erlref SYSTEM "erlref.dtd">
 
3
 
 
4
<erlref>
 
5
  <header>
 
6
    <copyright>
 
7
      <year>1998</year>
 
8
      <year>2007</year>
 
9
      <holder>Ericsson AB, All Rights Reserved</holder>
 
10
    </copyright>
 
11
    <legalnotice>
 
12
  The contents of this file are subject to the Erlang Public License,
 
13
  Version 1.1, (the "License"); you may not use this file except in
 
14
  compliance with the License. You should have received a copy of the
 
15
  Erlang Public License along with this software. If not, it can be
 
16
  retrieved online at http://www.erlang.org/.
 
17
 
 
18
  Software distributed under the License is distributed on an "AS IS"
 
19
  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
 
20
  the License for the specific language governing rights and limitations
 
21
  under the License.
 
22
 
 
23
  The Initial Developer of the Original Code is Ericsson AB.
 
24
    </legalnotice>
 
25
 
 
26
    <title>nteventlog</title>
 
27
    <prepared></prepared>
 
28
    <docno></docno>
 
29
    <date></date>
 
30
    <rev></rev>
 
31
  </header>
 
32
  <module>nteventlog</module>
 
33
  <modulesummary>Interface to Windows Event Log</modulesummary>
 
34
  <description>
 
35
    <p><c>nteventlog</c> provides a generic interface to the Windows
 
36
      event log. It is part of the OS_Mon application, see
 
37
      <seealso marker="os_mon">os_mon(6)</seealso>. Available for
 
38
      Windows versions where the event log is available. That is, not
 
39
      for Windows 98 and some other older Windows versions, but for most
 
40
      (all?) newer Windows versions.</p>
 
41
    <p>This module is used as the Windows backend for <c>os_sup</c>, see
 
42
      <seealso marker="os_sup">os_sup(3)</seealso>.</p>
 
43
    <p>To retain backwards compatibility, this module can also be used
 
44
      to start a standalone <c>nteventlog</c> process which is not part
 
45
      of the OS_Mon supervision tree. When starting such a process,
 
46
      the user has to supply an identifier as well as a callback
 
47
      function to handle the messages.</p>
 
48
    <p>The identifier, an arbitrary string, should be reused whenever
 
49
      the same application (or node) wants to start the process.
 
50
      <c>nteventlog</c> is informed about all events that have arrived
 
51
      to the eventlog since the last accepted message for the current
 
52
      identifier. As long as the same identifier is used, the same
 
53
      eventlog record will not be sent to <c>nteventlog</c> more than
 
54
      once (with the exception of when graved system failures arise, in
 
55
      which case the last records written before the failure may be
 
56
      sent to Erlang again after reboot).</p>
 
57
    <p>If the event log is configured to wrap around automatically,
 
58
      records that have arrived to the log and been overwritten when
 
59
      <c>nteventlog</c> was not running are lost. It however detects
 
60
      this state and loses no records that are not overwritten.</p>
 
61
    <p>The callback function works as described in <c>os_sup(3)</c>.</p>
 
62
  </description>
 
63
  <funcs>
 
64
    <func>
 
65
      <name>start(Identifier, MFA) -> Result</name>
 
66
      <name>start_link(Identifier, MFA) -> Result</name>
 
67
      <fsummary>Start the NT eventlog server</fsummary>
 
68
      <type>
 
69
        <v>Identifier = string() | atom()</v>
 
70
        <v>MFA = {Mod, Func, Args}</v>
 
71
        <v>&nbsp;Mod = Func = atom()</v>
 
72
        <v>&nbsp;Args = [term()]</v>
 
73
        <v>Result = {ok, Pid} | {error, {already_started, Pid}}</v>
 
74
        <v>Pid = pid()</v>
 
75
      </type>
 
76
      <desc>
 
77
        <p>This function starts the standalone <c>nteventlog</c> process
 
78
          and, if <c>start_link/2</c> is used, links to it.</p>
 
79
        <p><c>Identifier</c> is an identifier as described above.</p>
 
80
        <p><c>MFA</c> is the supplied callback function. When
 
81
          <c>nteventlog</c> receives information about a new event, this
 
82
          function will be called as <c>apply(Mod, Func, [Event|Args])</c> where <c>Event</c> is a tuple</p>
 
83
      </desc>
 
84
    </func>
 
85
    <func>
 
86
      <name>stop() -> stopped</name>
 
87
      <fsummary>Stop the NT eventlog server</fsummary>
 
88
      <type>
 
89
        <v>Result = stopped</v>
 
90
      </type>
 
91
      <desc>
 
92
        <p>Stops <c>nteventlog</c>. Usually only used during
 
93
          development. The server does not have to be shut down
 
94
          gracefully to maintain its state.</p>
 
95
      </desc>
 
96
    </func>
 
97
  </funcs>
 
98
 
 
99
  <section>
 
100
    <title>See Also</title>
 
101
    <p><seealso marker="os_mon">os_mon(6)</seealso>,
 
102
      <seealso marker="os_sup">os_sup(3)</seealso></p>
 
103
    <p>Windows NT documentation</p>
 
104
  </section>
 
105
</erlref>
 
106