Is it possible to add "nxalarm msg <id> Comment"?
				
			This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote$ nxdbmgr upgrade
NetXMS Database Manager Version 1.2.14 Build 7876
Upgrading database...
Your database format is up to date
Quote(gdb) run -c /etc/netxmsd.conf -D0
Starting program: /usr/bin/netxmsd -c /etc/netxmsd.conf -D0
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Using configuration file "/etc/netxmsd.conf"
[02-Jun-2014 09:40:01.869] [INFO ] Platform subagent "/usr/lib/netxms/linux.nsm" successfully loaded
[02-Jun-2014 09:40:01.921] [INFO ] Database driver "pgsql.ddr" loaded and initialized successfully
[New Thread 0x7ffff7f71700 (LWP 5494)]
[02-Jun-2014 09:40:02.020] [INFO ] Stalled database lock removed
[New Thread 0x7ffff04c0700 (LWP 5495)]
[New Thread 0x7ffff03bf700 (LWP 5496)]
[02-Jun-2014 09:40:02.068] [INFO ] Network device driver "ERS8000" loaded successfully
[02-Jun-2014 09:40:02.073] [INFO ] Network device driver "SYMBOL-WS" loaded successfully
[02-Jun-2014 09:40:02.079] [INFO ] Network device driver "DLINK" loaded successfully
[02-Jun-2014 09:40:02.084] [INFO ] Network device driver "CISCO-SB" loaded successfully
[02-Jun-2014 09:40:02.089] [INFO ] Network device driver "BAYSTACK" loaded successfully
[02-Jun-2014 09:40:02.095] [INFO ] Network device driver "NETSCREEN" loaded successfully
[02-Jun-2014 09:40:02.101] [INFO ] Network device driver "UBNT" loaded successfully
[02-Jun-2014 09:40:02.108] [INFO ] Network device driver "CATALYST-GENERIC" loaded successfully
[02-Jun-2014 09:40:02.114] [INFO ] Network device driver "DELL-PWC" loaded successfully
[02-Jun-2014 09:40:02.119] [INFO ] Network device driver "PROCURVE" loaded successfully
[02-Jun-2014 09:40:02.125] [INFO ] Network device driver "CISCO-ESW" loaded successfully
[02-Jun-2014 09:40:02.131] [INFO ] Network device driver "MIKROTIK" loaded successfully
[02-Jun-2014 09:40:02.137] [INFO ] Network device driver "NTWS" loaded successfully
[02-Jun-2014 09:40:02.143] [INFO ] Network device driver "AIRESPACE" loaded successfully
[02-Jun-2014 09:40:02.151] [INFO ] Network device driver "PING3" loaded successfully
[02-Jun-2014 09:40:02.156] [INFO ] Network device driver "CATALYST-2900XL" loaded successfully
[02-Jun-2014 09:40:02.164] [INFO ] Network device driver "AT" loaded successfully
[New Thread 0x7fffedc86700 (LWP 5497)]
[New Thread 0x7fffedb85700 (LWP 5498)]
[Thread 0x7fffedb85700 (LWP 5498) exited]
*** Error in `/usr/bin/netxmsd': double free or corruption (fasttop): 0x0000000000abaf00 ***
Program received signal SIGABRT, Aborted.
0x00007ffff4a4cf79 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 0x00007ffff4a4cf79 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007ffff4a50388 in __GI_abort () at abort.c:89
#2 0x00007ffff4a8a1d4 in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7ffff4b98a10 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175
#3 0x00007ffff4a964ae in malloc_printerr (ptr=<optimized out>, str=0x7ffff4b98bd8 "double free or corruption (fasttop)", action=1) at malloc.c:4996
#4 _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at malloc.c:3840
#5 0x00007ffff73a4556 in yyparse (scanner=0xab6e00, pLexer=0xab4b10, pCompiler=pCompiler@entry=0x7fffffff7350, pScript=pScript@entry=0xaa8140) at parser.tab.cpp:3547
#6 0x00007ffff73a788e in NXSL_Compiler::compile (this=this@entry=0x7fffffff7350, pszSourceCode=pszSourceCode@entry=0xaa7fd0 L"sub main() {\r\n return ($node->isAgent &&\r\n $node->agentVersion ~= \"^1.2.6$\";\r\n}")
at compiler.cpp:87
#7 0x00007ffff73aa9af in NXSLCompile (pszSource=0xaa7fd0 L"sub main() {\r\n return ($node->isAgent &&\r\n $node->agentVersion ~= \"^1.2.6$\";\r\n}", pszError=pszError@entry=0x7fffffff77e0 L"\xf4a87aa0ç¿¿\001",
nBufSize=nBufSize@entry=256) at main.cpp:45
#8 0x00007ffff73aaa4e in NXSLCompileAndCreateVM (pszSource=<optimized out>, pszError=0x7fffffff77e0 L"\xf4a87aa0ç¿¿\001", nBufSize=256, env=0x998640) at main.cpp:59
#9 0x00007ffff7af4fa5 in Template::CreateFromDB (this=0xaa64d0, dwId=<optimized out>) at template.cpp:201
#10 0x00007ffff7ac2a9e in LoadObjects () at objects.cpp:1376
#11 0x00007ffff7a9a3fe in Initialize () at main.cpp:754
#12 0x0000000000401285 in main (argc=<optimized out>, argv=<optimized out>) at netxmsd.cpp:482
(gdb)
Quote[02-Jun-2014 09:34:56.689] Log file opened
[02-Jun-2014 09:34:56.689] [DEBUG] Code page set to ASCII
[02-Jun-2014 09:34:56.690] [INFO ] Platform subagent "/usr/lib/netxms/linux.nsm" successfully loaded
[02-Jun-2014 09:34:56.691] [DEBUG] Debug callback set for DB library
[02-Jun-2014 09:34:56.706] [INFO ] Database driver "pgsql.ddr" loaded and initialized successfully
[02-Jun-2014 09:34:56.735] [DEBUG] New DB connection opened: handle=0xe5e110
[02-Jun-2014 09:34:56.735] [DEBUG] Successfully connected to database netxms@localhost
[02-Jun-2014 09:34:56.773] [DEBUG] New DB connection opened: handle=0xe5bbc0
[02-Jun-2014 09:34:56.795] [DEBUG] New DB connection opened: handle=0xe86c40
[02-Jun-2014 09:34:56.818] [DEBUG] New DB connection opened: handle=0xe7c980
[02-Jun-2014 09:34:56.845] [DEBUG] New DB connection opened: handle=0xe7c110
[02-Jun-2014 09:34:56.868] [DEBUG] New DB connection opened: handle=0xec3940
[02-Jun-2014 09:34:56.868] [DEBUG] Database Connection Pool initialized
[02-Jun-2014 09:34:56.868] [DEBUG] Database Connection Pool maintenance thread started
[02-Jun-2014 09:34:56.877] [INFO ] Stalled database lock removed
[02-Jun-2014 09:34:56.890] [DEBUG] Data directory set to /usr/share/netxms from server configuration variable
[02-Jun-2014 09:34:56.894] [DEBUG] CAS config reloaded
[02-Jun-2014 09:34:56.894] [DEBUG] Global configuration loaded
[02-Jun-2014 09:34:56.895] [DEBUG] Validating ciphers
[02-Jun-2014 09:34:56.895] [DEBUG] AES-256 enabled
[02-Jun-2014 09:34:56.895] [DEBUG] Blowfish-256 enabled
[02-Jun-2014 09:34:56.895] [DEBUG] IDEA disabled (config)
[02-Jun-2014 09:34:56.895] [DEBUG] 3DES enabled
[02-Jun-2014 09:34:56.895] [DEBUG] AES-128 enabled
[02-Jun-2014 09:34:56.895] [DEBUG] Blowfish-128 enabled
[02-Jun-2014 09:34:56.895] [DEBUG] Crypto library initialized
[02-Jun-2014 09:34:56.915] [DEBUG] ID table created
[02-Jun-2014 09:34:56.916] [DEBUG] Script Filter::SNMP added to library
[02-Jun-2014 09:34:56.916] [DEBUG] Script Filter::Agent added to library
[02-Jun-2014 09:34:56.916] [DEBUG] Script Filter::AgentOrSNMP added to library
[02-Jun-2014 09:34:56.916] [DEBUG] Script DCI::SampleTransform added to library
[02-Jun-2014 09:34:56.917] [DEBUG] Script Filter::QFAgent added to library
[02-Jun-2014 09:34:56.917] [DEBUG] Script InfraOrganizer2 added to library
[02-Jun-2014 09:34:56.917] [DEBUG] Script InfraOrganizer added to library
[02-Jun-2014 09:34:56.917] [DEBUG] SMTP mailer thread started
[02-Jun-2014 09:34:56.918] [DEBUG] User account status update thread started
[02-Jun-2014 09:34:56.921] [DEBUG] User accounts loaded
[02-Jun-2014 09:34:56.922] [DEBUG] Loading network device drivers from /usr/lib/netxms/ndd
[02-Jun-2014 09:34:56.922] [INFO ] Network device driver "ERS8000" loaded successfully
[02-Jun-2014 09:34:56.922] [INFO ] Network device driver "SYMBOL-WS" loaded successfully
[02-Jun-2014 09:34:56.922] [INFO ] Network device driver "DLINK" loaded successfully
[02-Jun-2014 09:34:56.923] [INFO ] Network device driver "CISCO-SB" loaded successfully
[02-Jun-2014 09:34:56.923] [INFO ] Network device driver "BAYSTACK" loaded successfully
[02-Jun-2014 09:34:56.923] [INFO ] Network device driver "NETSCREEN" loaded successfully
[02-Jun-2014 09:34:56.923] [INFO ] Network device driver "UBNT" loaded successfully
[02-Jun-2014 09:34:56.923] [INFO ] Network device driver "CATALYST-GENERIC" loaded successfully
[02-Jun-2014 09:34:56.924] [INFO ] Network device driver "DELL-PWC" loaded successfully
[02-Jun-2014 09:34:56.924] [INFO ] Network device driver "PROCURVE" loaded successfully
[02-Jun-2014 09:34:56.924] [INFO ] Network device driver "CISCO-ESW" loaded successfully
[02-Jun-2014 09:34:56.924] [INFO ] Network device driver "MIKROTIK" loaded successfully
[02-Jun-2014 09:34:56.925] [INFO ] Network device driver "NTWS" loaded successfully
[02-Jun-2014 09:34:56.925] [INFO ] Network device driver "AIRESPACE" loaded successfully
[02-Jun-2014 09:34:56.925] [INFO ] Network device driver "PING3" loaded successfully
[02-Jun-2014 09:34:56.925] [INFO ] Network device driver "CATALYST-2900XL" loaded successfully
[02-Jun-2014 09:34:56.926] [INFO ] Network device driver "AT" loaded successfully
[02-Jun-2014 09:34:56.926] [DEBUG] 17 network device drivers loaded
[02-Jun-2014 09:34:56.929] [DEBUG] Built-in objects created
[02-Jun-2014 09:34:56.929] [DEBUG] Loading container categories...
[02-Jun-2014 09:34:56.929] [DEBUG] Loading built-in object properties...
[02-Jun-2014 09:34:56.931] [DEBUG] Apply template thread started
[02-Jun-2014 09:34:56.936] [DEBUG] NetObj::loadCommonProperties() failed for object Policies [5] class=16
[02-Jun-2014 09:34:56.937] [DEBUG] NetObj::loadCommonProperties() failed for object Network Maps [6] class=19
[02-Jun-2014 09:34:56.943] [DEBUG] Loading conditions...
[02-Jun-2014 09:34:56.946] [DEBUG] Loading subnets...
[02-Jun-2014 09:34:56.984] [DEBUG] Loading mobile devices...
[02-Jun-2014 09:34:56.985] [DEBUG] Loading nodes...
[02-Jun-2014 09:34:59.499] [DEBUG] Loading access points...
[02-Jun-2014 09:34:59.500] [DEBUG] Loading interfaces...
[02-Jun-2014 09:34:59.912] [DEBUG] WARNING: duplicate interface IP address 0A7807F8 (interface object IP Interface [1048])
[02-Jun-2014 09:35:00.317] [DEBUG] Loading network services...
[02-Jun-2014 09:35:00.319] [DEBUG] Loading VPN connectors...
[02-Jun-2014 09:35:00.327] [DEBUG] Loading clusters...
[02-Jun-2014 09:35:00.327] [DEBUG] Loading templates...
[02-Jun-2014 09:35:00.328] [DEBUG] Started caching of DCI values
[02-Jun-2014 09:35:00.339] [DEBUG] Finished caching of DCI values
user@box:~$ status smbd
smbd start/running, process 1406user@box:~$ smbstatus
Samba version 3.6.3
PID     Username      Group         Machine
-------------------------------------------------------------------
Service      pid     machine       Connected at
-------------------------------------------------------
share1       2714    client1        Tue Apr  8 20:42:18 2014
share1       31445  client2        Mon Apr 14 11:17:00 2014
share2       2714    client3        Tue Apr  8 20:42:18 2014
share3       2714    client2        Tue Apr  8 20:42:18 2014
Locked files:
Pid          Uid        DenyMode   Access      R/W        Oplock           SharePath   Name   Time
--------------------------------------------------------------------------------------------------
31445        1000       DENY_NONE  0x100081    RDONLY     NONE             /srv/user   path/OpenFolder   Mon Apr 21 19:32:00 2014
user@box:~$ status smbd
smbd stop/waitinguser@box:~$ smbstatus
Samba version 3.6.3
PID     Username      Group         Machine
-------------------------------------------------------------------
Service      pid     machine       Connected at
-------------------------------------------------------
No locked filesuser@box:~$ ps aux|grep smbd
root     15030  0.0  0.2 122504  5756 ?        Ss   15:44   0:00 smbd -F
root     15031  0.0  0.0 122504  1508 ?        S    15:44   0:00 smbd -F
user   15032  0.0  0.1 124976  3524 ?        S    15:44   0:00 smbd -Fdef changeFlags(getFlags, flag, status):
  if flag == "snmp":
    bit=24
  elif flag == "nxcp":
    bit=25
  else:
    return "ERROR, flag missing or not found"
  
  if status == "on":
    getFlags &= ~(1 << bit);
  else:
    getFlags |= (1 << bit);
  return getFlagsgetFlags=node.getFlags()
getFlags = changeFlags(getFlags, "snmp", "on")
getFlags = changeFlags(getFlags, "nxcp", "off")
md = NXCObjectModificationData(node.getObjectId())
md.setObjectFlags(getFlags)
session.modifyObject(md)
				import org.netxms.client.NXCObjectModificationData
from org.netxms.client.objects import Node
for node in [o for o in s.getAllObjects() if isinstance(o, objects.Node)]:
  name=node.getObjectName()
  
  #newFlags = node.getFlags() | Node.NF_DISABLE_SNMP | Node.NF_DISABLE_NXCP
  #newFlags = node.getFlags() | Node.NF_DISABLE_SNMP
  newFlags = node.getFlags() | Node.NF_DISABLE_NXCP
  md = NXCObjectModificationData(node.getObjectId())
  md.setObjectFlags(newFlags)
  session.modifyObject(md)