Datastax agents: Unable to find a matching cluster for node with IP - opscenter

Trying to get OpsCenter 5.2.2 after fresh install to pick up data from two new clusters. Both cluster are freshly installed and runs fine:
[root#d1r1n1 ~]# metatool status
Note: Ownership information does not include topology; for complete information, specify a keyspace
Datacenter: OPA3
================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns Host ID Rack
UN 10.45.68.13 136.01 KB 1 7.1% 692e6062-388d-49f4-93de-380405e1495f R3.3.16
UN 10.45.68.12 150.64 KB 1 7.1% 20534507-1924-4240-a980-d4296566d48d R3.3.16
UN 10.45.68.14 136.34 KB 1 7.1% 6bcdf08f-f49e-438e-b102-ac1b132cd3af R3.3.16
UN 10.45.68.9 155.83 KB 1 7.1% 5984016d-7ab4-4cfc-99a7-1fb44e2525d5 R3.3.16
UN 10.45.68.8 140.67 KB 1 7.1% bea12c79-5856-4dd6-8c2e-e2498229ab1e R3.3.16
UN 10.45.68.11 150.44 KB 1 7.1% 58082d4c-c5bb-42b2-abfc-472602e6fd3c R3.3.16
UN 10.45.68.10 155.61 KB 1 7.1% 489c3a11-2b7e-4dc0-b023-fca1b611d7d5 R3.3.16
UN 10.45.68.5 134.14 KB 1 7.1% b42e3bb5-d033-4cd2-9a4d-d68e12026403 R3.3.16
UN 10.45.68.4 136.04 KB 1 7.1% ad33485c-e4f8-40b8-804f-363ea326319c R3.3.16
UN 10.45.68.7 150.67 KB 1 7.1% 174040b9-ea42-43c2-88f2-26c18ebeef15 R3.3.16
UN 10.45.68.6 134.33 KB 1 7.1% 7da26426-a4d6-4d21-b1e9-ac2a5896a453 R3.3.16
UN 10.45.68.1 141.33 KB 1 7.1% 466832c8-95b7-4cd9-8ace-87624478f79a R3.3.16
UN 10.45.68.3 126.15 KB 1 7.1% 99a2332d-97d2-46e8-b93d-1986e7161789 R3.3.16
UN 10.45.68.2 126.69 KB 1 7.1% 03c62604-9a6f-42be-8d77-0a8f4113a307 R3.3.16
[root#d1r1n1 ~]# blobtool status
Note: Ownership information does not include topology; for complete information, specify a keyspace
Datacenter: OPA3
================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns Host ID Rack
UN 10.45.68.13 104.56 KB 1 7.1% 103038fc-dce8-455b-84c4-5d1abee2a9d2 R3.3.16
UN 10.45.68.12 105 KB 1 7.1% fb24a3ff-69fc-47d6-b434-db6e00aaea98 R3.3.16
UN 10.45.68.14 105.05 KB 1 7.1% 776d8a1b-9f63-4a04-93fc-1cb8b3439997 R3.3.16
UN 10.45.68.9 121.56 KB 1 7.1% 3a8d9139-67af-4c14-bfb8-880517323e5b R3.3.16
UN 10.45.68.8 106.51 KB 1 7.1% c41e9965-2a27-45cb-aa3e-d9f9b59cbc98 R3.3.16
UN 10.45.68.11 119.31 KB 1 7.1% 7528c8f6-aa79-4776-8a98-5c2890f2cf3d R3.3.16
UN 10.45.68.10 119.29 KB 1 7.1% 12109e0b-e25e-45f1-b891-fe6debe91891 R3.3.16
UN 10.45.68.5 105.67 KB 1 7.1% 378a6f68-9014-4f04-9004-2cc1a0b607a9 R3.3.16
UN 10.45.68.4 117.05 KB 1 7.1% 7128ae20-186e-4b63-a284-4949e6596c11 R3.3.16
UN 10.45.68.7 106.6 KB 1 7.1% 165ade74-c5b2-4086-961c-8fe14a266379 R3.3.16
UN 10.45.68.6 106.63 KB 1 7.1% 744a6c72-b0fb-4db7-8582-a82a62ad74e5 R3.3.16
UN 10.45.68.1 113.92 KB 1 7.1% 3c4805f1-e606-450f-9c98-68b1ea7f9d4f R3.3.16
UN 10.45.68.3 116.47 KB 1 7.1% 6b0dc9fa-576f-4832-b16e-0051b0d6d48a R3.3.16
UN 10.45.68.2 101.05 KB 1 7.1% 2eb608f3-9499-4862-be0c-5154115ab4ea R3.3.16
[root#d1r1n1 ~]# alias | grep tool
alias blobtool='nodetool -h localhost -p 8081'
alias metatool='nodetool -h localhost -p 8082'
Defined my two clusters in OpsCenter only whenever data are send from the agents; I get this annoying warnings in /var/log/opscenter/opscenter.log:
2015-10-30 18:09:58+0100 [] WARN: Unable to find a matching cluster for node with IP d1r1n1; the message was {u'os-load': 0.040000000000000001}. This usually indicates that an OpsCenter agent is still running on an old node that was decommissioned or is part of a cluster that OpsCenter is no longer monitoring.
Wonder if the host name d1r1n1 instead of it's IP is an issue though:
[root#opsc opscenter]# dig +short d1r1n1
[root#opsc opscenter]# dig +short +search d1r1n1
10.45.68.1
Not sure why and how to fix this, hints are appreciated.
TIA!
Screen Dump of Overview Dashboard here!

Related

How to get the device memory or application size(Memory taken in Internal storage) using Appium

I have to get the details such as CPU, Memory(RAM), Battery, Startup time, App Size. Im able to get other things except App Size using Appium. Someone please help.
Thanks
Seems like Appium is not capable to perform this for you. However, you can check the memory usage in Android using adb:
$ adb shell dumpsys meminfo com.android.systemui
Which returns something like this:
Applications Memory Usage (in Kilobytes):
Uptime: 433213978 Realtime: 631179899
** MEMINFO in pid 1541 [com.android.systemui] **
Pss Private Private SwapPss Heap Heap Heap
Total Dirty Clean Dirty Size Alloc Free
------ ------ ------ ------ ------ ------ ------
Native Heap 106880 106780 0 73228 196200 182430 13769
Dalvik Heap 35655 35636 0 217 40741 20371 20370
Dalvik Other 3347 3344 0 112
Stack 56 56 0 16
Ashmem 4 0 0 0
Other dev 18 0 16 0
.so mmap 2998 164 352 499
.jar mmap 669 0 248 0
.apk mmap 17904 0 13620 0
.ttf mmap 372 0 180 0
.dex mmap 10041 16 10020 20
.oat mmap 3848 0 84 0
.art mmap 1641 1364 0 123
Other mmap 64 12 24 0
EGL mtrack 106434 106434 0 0
GL mtrack 55564 55564 0 0
Unknown 1952 1948 0 1565
TOTAL 423227 311318 24544 75780 236941 202801 34139
For iOS, my currently limited toolchain doesn't help much. You may have luck using Instruments, for which you can find here a command-line reference, but I haven't tried that: https://help.apple.com/instruments/mac/current/#/devb14ffaa5

Awk value greater than 40

Can someone please help me. I'm trying to get values greater than 40, but when it's at 100 it doesn't get it.
[root#localhost home]# df -Pk --block-size=1M
Filesystem 1048576-blocks Used Available Capacity Mounted on
/dev/mapper/rhel-root 22510 13135 9375 59% /
devtmpfs 905 0 905 0% /dev
tmpfs 920 1 920 1% /dev/shm
tmpfs 920 9 911 1% /run
tmpfs 920 0 920 0% /sys/fs/cgroup
/dev/sda1 1014 178 837 18% /boot
Linux_DB2 240879 96794 144086 41% /media/sf_Linux_DB2
tmpfs 184 1 184 1% /run/user/42
tmpfs 184 1 184 1% /run/user/0
*/dev/sr0 56 56 0 100% /run/media/root/VBox_GAs_5.2.20*
[root#localhost home]# df -Pk --block-size=1M | awk '$5 > 40'
Filesystem 1048576-blocks Used Available Capacity Mounted on
/dev/mapper/rhel-root 22510 13135 9375 59% /
Linux_DB2 240879 96794 144086 41% /media/sf_Linux_DB2
The /dev/sr0 56 56 0 100% /run/media/root/VBox_GAs_5.2.20 doesn't come out.
Could you please try following once.
df -hP | awk '$5+0>40'
Explanation: Since 5th field of disk usage is having string with digits added, so by adding a zero +0 with $5 it tells awk to keep only digits in comparison and it will NOT have strings in it. Then this condition will considered like digits are getting compared, will show the right output then. Here -P option with df command is also crucial since it gives the output of df in a single line and it makes awk command's life easy to get its calculations done.

Memory Leak in Unknown Field from meminfo

I am loosing about 18k every five minutes in the Unknown Field. Any ideas what this could be and how to debug it?
Thanks!
Applications Memory Usage (kB):
Uptime: 444373583 Realtime: 444373583
** MEMINFO in pid 4758 [org.domain.activity] **
Pss Private Private Swapped Heap Heap Heap
Total Dirty Clean Dirty Size Alloc Free
------ ------ ------ ------ ------ ------ ------
Native Heap 0 0 0 0 13492 12878 613
Dalvik Heap 6983 6912 0 0 8932 7183 1749
Dalvik Other 1761 1620 0 0
Stack 192 192 0 0
Ashmem 7 0 0 0
Other dev 192 188 4 0
.so mmap 2996 2284 88 0
.apk mmap 53 0 12 0
.ttf mmap 7 0 0 0
.dex mmap 896 8 544 0
Other mmap 7 4 0 0
Unknown 12018 11992 0 0
TOTAL 25112 23200 648 0 22424 20061 2362
Objects
Views: 26 ViewRootImpl: 1
AppContexts: 3 Activities: 1
Assets: 3 AssetManagers: 3
Local Binders: 7 Proxy Binders: 16
Death Recipients: 0
OpenSSL Sockets: 0
SQL
MEMORY_USED: 0
PAGECACHE_OVERFLOW: 0 MALLOC_SIZE: 0
Asset Allocations
zip:/data/app/org.domain.activity.apk:/assets/DS-DIGIB.TTF: 24K

Confusing DebugDiag report to identify High Memory usage

Recently I got a new batch of dumps to identify the HighMemory usage in 3 of our WCF Services. Which are hosted on 64Bit AppPool and Windows Server 2012.
Application one :
ProcessUp Time : 22 days
GC Heap usage : 2.69 Gb
Loaded Modules : 220 Mb
Commited Memory : 3.08 Gb
Native memory : 2 Gb
Issue identified as large GC heap usage is due to un closed WCF client proxy objects. Which are accounting for almost 2.26 Gb and rest for cache in GC heap.
Application Two :
ProcessUp Time : 9 Hours
GC Heap usage : 4.43 Gb
Cache size : 2.45 Gb
Loaded Modules : 224 Mb
Commited Memory : 5.13 Gb
Native memory heap : 2 Gb
Issue identified as most of the objects are of System.Web.CaheEntry, as they are due to large cache size. 2.2 Gb of String object on Gc heap has roots to CacheRef root objects.
Application Three :
Cache size : 950 Mb
GC heap : 1.2 Gb
Native Heap : 2 Gb
We recently upgrade to Windows Server 2012, I had old dumps as well. Those dumps does not show the native heap for the same application. It was only around 90 Mb.
I also use WinDbg to explore the Native heap with !heap -s command.
which shows very minimal native heap sizes as shown below.
I am just confused Why DebugDiag 2.0 is showing 2Gb of Native Heap in every WCF service. My understand is that !heap -s should also dump the same native heaps and it should match the debug diag reports graphs. Report also shows values in Thoushand of TBytes.
0:000> !heap -s
LFH Key : 0x53144a890e31e98b
Termination on corruption : ENABLED
Heap Flags Reserv Commit Virt Free List UCR Virt Lock Fast
(k) (k) (k) (k) length blocks cont. heap
-------------------------------------------------------------------------------------
000000fc42c10000 00000002 32656 31260 32552 2885 497 6 2 f LFH
000000fc42a40000 00008000 64 4 64 2 1 1 0 0
000000fc42bf0000 00001002 3228 1612 3124 43 9 3 0 0 LFH
000000fc43400000 00001002 1184 76 1080 1 5 2 0 0 LFH
000000fc43390000 00001002 1184 148 1080 41 7 2 0 0 LFH
000000fc43d80000 00001002 60 8 60 5 1 1 0 0
000000fc433f0000 00001002 60 8 60 5 1 1 0 0
000000fc442a0000 00001002 1184 196 1080 1 6 2 0 0 LFH
000000fc44470000 00041002 60 8 60 5 1 1 0 0
000001008e9f0000 00041002 164 40 60 3 1 1 0 0 LFH
000001008f450000 00001002 3124 1076 3124 1073 3 3 0 0
External fragmentation 99 % (3 free blocks)
-------------------------------------------------------------------------------------
Can anybody explain me why WinDbg command !heap -s and DebugDiag report is varing. Or I have incorrect knowledge of above command.
I also use Pykd script to dump native object stats. Which does not show much large number of objects.
Also what is mean by External fragmentation 99 % (3 free blocks)
in above output. I understand that fragmented memory has less large block of continuous memory place. But fail to relate it with Percentage.
Edit 1 :
Application 2 :
0:000> !address -summary
Mapping file section regions...
Mapping module regions...
Mapping PEB regions...
Mapping TEB and stack regions...
Mapping heap regions...
Mapping page heap regions...
Mapping other regions...
Mapping stack trace database regions...
Mapping activation context regions...
--- Usage Summary ---------------- RgnCount ----------- Total Size -------- %ofBusy %ofTotal
Free 363 7ffb`04a14000 ( 127.981 Tb) 99.98%
<unknown> 952 4`e8c0c000 ( 19.637 Gb) 98.54% 0.01%
Image 2122 0`0e08d000 ( 224.551 Mb) 1.10% 0.00%
Heap 88 0`03372000 ( 51.445 Mb) 0.25% 0.00%
Stack 124 0`013c0000 ( 19.750 Mb) 0.10% 0.00%
Other 7 0`001be000 ( 1.742 Mb) 0.01% 0.00%
TEB 41 0`00052000 ( 328.000 kb) 0.00% 0.00%
PEB 1 0`00001000 ( 4.000 kb) 0.00% 0.00%
--- Type Summary (for busy) ------ RgnCount ----------- Total Size -------- %ofBusy %ofTotal
MEM_PRIVATE 643 4`ebf44000 ( 19.687 Gb) 98.79% 0.02%
MEM_IMAGE 2655 0`0eb96000 ( 235.586 Mb) 1.15% 0.00%
MEM_MAPPED 37 0`00b02000 ( 11.008 Mb) 0.05% 0.00%
--- State Summary ---------------- RgnCount ----------- Total Size -------- %ofBusy %ofTotal
MEM_FREE 363 7ffb`04a14000 ( 127.981 Tb) 99.98%
MEM_RESERVE 725 3`b300d000 ( 14.797 Gb) 74.25% 0.01%
MEM_COMMIT 2610 1`485cf000 ( 5.131 Gb) 25.75% 0.00%
--- Protect Summary (for commit) - RgnCount ----------- Total Size -------- %ofBusy %ofTotal
PAGE_READWRITE 868 1`3939d000 ( 4.894 Gb) 24.56% 0.00%
PAGE_EXECUTE_READ 157 0`09f10000 ( 159.063 Mb) 0.78% 0.00%
PAGE_READONLY 890 0`035ed000 ( 53.926 Mb) 0.26% 0.00%
PAGE_WRITECOPY 433 0`0149c000 ( 20.609 Mb) 0.10% 0.00%
PAGE_EXECUTE_READWRITE 148 0`0065d000 ( 6.363 Mb) 0.03% 0.00%
PAGE_EXECUTE_WRITECOPY 67 0`0017c000 ( 1.484 Mb) 0.01% 0.00%
PAGE_READWRITE|PAGE_GUARD 41 0`000b9000 ( 740.000 kb) 0.00% 0.00%
PAGE_NOACCESS 4 0`00004000 ( 16.000 kb) 0.00% 0.00%
PAGE_EXECUTE 2 0`00003000 ( 12.000 kb) 0.00% 0.00%
--- Largest Region by Usage ----------- Base Address -------- Region Size ----------
Free 101`070a0000 7ef6`e77b2000 ( 126.964 Tb)
<unknown> fd`72f14000 0`d156c000 ( 3.271 Gb)
Image 7ff9`91344000 0`012e8000 ( 18.906 Mb)
Heap 100`928a0000 0`00544000 ( 5.266 Mb)
Stack fc`43240000 0`0007b000 ( 492.000 kb)
Other fc`42ea0000 0`00181000 ( 1.504 Mb)
TEB 7ff7`ee852000 0`00002000 ( 8.000 kb)
PEB 7ff7`eeaaf000 0`00001000 ( 4.000 kb)
Application Three :
0:000> !address -summary
--- Usage Summary ---------------- RgnCount ----------- Total Size -------- %ofBusy %ofTotal
Free 323 7ffb`9f8ea000 ( 127.983 Tb) 99.99%
<unknown> 832 4`4bbb6000 ( 17.183 Gb) 98.15% 0.01%
Image 2057 0`0e5ab000 ( 229.668 Mb) 1.28% 0.00%
Heap 196 0`04f52000 ( 79.320 Mb) 0.44% 0.00%
Stack 127 0`01440000 ( 20.250 Mb) 0.11% 0.00%
Other 7 0`001be000 ( 1.742 Mb) 0.01% 0.00%
TEB 42 0`00054000 ( 336.000 kb) 0.00% 0.00%
PEB 1 0`00001000 ( 4.000 kb) 0.00% 0.00%
--- Type Summary (for busy) ------ RgnCount ----------- Total Size -------- %ofBusy %ofTotal
MEM_PRIVATE 783 4`51099000 ( 17.266 Gb) 98.63% 0.01%
MEM_IMAGE 2444 0`0ec06000 ( 236.023 Mb) 1.32% 0.00%
MEM_MAPPED 35 0`00a67000 ( 10.402 Mb) 0.06% 0.00%
--- State Summary ---------------- RgnCount ----------- Total Size -------- %ofBusy %ofTotal
MEM_FREE 323 7ffb`9f8ea000 ( 127.983 Tb) 99.99%
MEM_RESERVE 621 3`e3504000 ( 15.552 Gb) 88.83% 0.01%
MEM_COMMIT 2641 0`7d202000 ( 1.955 Gb) 11.17% 0.00%
--- Protect Summary (for commit) - RgnCount ----------- Total Size -------- %ofBusy %ofTotal
PAGE_READWRITE 919 0`6dc07000 ( 1.715 Gb) 9.80% 0.00%
PAGE_EXECUTE_READ 153 0`0a545000 ( 165.270 Mb) 0.92% 0.00%
PAGE_READONLY 734 0`02cf5000 ( 44.957 Mb) 0.25% 0.00%
PAGE_WRITECOPY 470 0`01767000 ( 23.402 Mb) 0.13% 0.00%
PAGE_EXECUTE_READWRITE 240 0`009cf000 ( 9.809 Mb) 0.05% 0.00%
PAGE_EXECUTE_WRITECOPY 76 0`001c5000 ( 1.770 Mb) 0.01% 0.00%
PAGE_READWRITE|PAGE_GUARD 42 0`000be000 ( 760.000 kb) 0.00% 0.00%
PAGE_NOACCESS 5 0`00005000 ( 20.000 kb) 0.00% 0.00%
PAGE_EXECUTE 2 0`00003000 ( 12.000 kb) 0.00% 0.00%
--- Largest Region by Usage ----------- Base Address -------- Region Size ----------
Free 52`892e0000 7fa5`65548000 ( 127.646 Tb)
<unknown> 4f`4ec81000 0`e9c3f000 ( 3.653 Gb)
Image 7ff9`91344000 0`012e8000 ( 18.906 Mb)
Heap 52`8833b000 0`00fa4000 ( 15.641 Mb)
Stack 4e`37a70000 0`0007b000 ( 492.000 kb)
Other 4e`37720000 0`00181000 ( 1.504 Mb)
TEB 7ff7`ee828000 0`00002000 ( 8.000 kb)
PEB 7ff7`eea43000 0`00001000 ( 4.000 kb)

How do I remove duplicates from the MAXMIND database?

I am currently working on the Maxmind database with the GeoIPCity-Location table and realised that hundreds of thousands of the data are duplicates. For example, I've searched for Newcastle Upon Tyne with:
SELECT * FROM MAXMIND
WHERE city='Newcastle Upon Tyne';
Which results in:
369137 GB I7 Newcastle Upon Tyne NE20 54.9881 -1.6194
369332 GB I7 Newcastle Upon Tyne NE6 54.9881 -1.6194
369345 GB I7 Newcastle Upon Tyne NE13 54.9881 -1.6194
369355 GB I7 Newcastle Upon Tyne NE3 54.9881 -1.6194
369356 GB I7 Newcastle Upon Tyne NE5 54.9881 -1.6194
369645 GB I7 Newcastle Upon Tyne NE4 54.9881 -1.6194
369706 GB I7 Newcastle Upon Tyne NE15 54.9881 -1.6194
369959 GB I7 Newcastle Upon Tyne NE12 54.9881 -1.6194
370114 GB I7 Newcastle Upon Tyne NE27 54.9881 -1.6194
This is worse if I just search for "Newcastle":
382 ZA 2 Newcastle -27.758 29.9318
2279 US OK Newcastle 73065 35.2323 -97.6008
26459 US CA Newcastle 95658 38.873 -121.1543
22382 CA ON Newcastle l1b1j9 43.9167 -78.5833
38995 AU 2 Newcastle -32.9278 151.7845
40025 US ME Newcastle 4553 44.0438 -69.5675
47937 GB I7 Newcastle 54.9881 -1.6194
119830 US ME Newcastle 4553 44.0438 -69.5675
119982 US NE Newcastle 68757 42.6475 -96.9232
115052 US CA Newcastle 95658 38.873 -121.1543
120603 US NE Newcastle 68757 42.6475 -96.9232
127931 US OK Newcastle 73065 35.2323 -97.6008
136726 CA ON Newcastle 43.9167 -78.5833
136915 US TX Newcastle 76372 33.245 -98.9103
137128 US WY Newcastle 82701 43.8396 -104.5681
137130 US WY Newcastle 82701 43.8396 -104.5681
144799 IE 16 Newcastle 52.4492 -9.0611
207626 US UT Newcastle 84756 37.6924 -113.6272
213128 US UT Newcastle 84756 37.6924 -113.6272
221968 KN 5 Newcastle 17.2 -62.5833
229237 CA ON Newcastle l1b1l4 43.9167 -78.5833
232235 GB M9 Newcastle 54.9881 -1.6194
229005 CA ON Newcastle l1b1g1 43.9167 -78.5833
228722 CA ON Newcastle l1b1k9 43.9167 -78.5833
242102 CA NB Newcastle 46.9833 -65.5667
252530 IE 7 Newcastle 53.3011 -6.5022
267662 CA ON Newcastle l1b1h5 43.9167 -78.5833
266263 IE 31 Newcastle 53.0683 -6.0658
313271 CA ON Newcastle l1b1h8 43.9167 -78.5833
306632 IE 10 Newcastle 53.3408 -8.6783
320151 CA ON Newcastle l1b1l2 43.9167 -78.5833
336868 GB L6 Newcastle 52.4333 -3.1167
353050 GB R9 Newcastle 54.2 -5.8833
349314 GB Q7 Newcastle 54.3833 -5.4667
377107 ZA 2 Newcastle 2940 -27.758 29.9318
369587 GB I7 Newcastle ST5 54.9881 -1.6194
387865 AU 2 Newcastle 2297 -32.9278 151.7845
387889 AU 2 Newcastle 2300 -32.9278 151.7845
387978 AU 2 Newcastle 2306 -32.9278 151.7845
388098 AU 2 Newcastle 2302 -32.9278 151.7845
392595 AU 2 Newcastle 2296 -32.9278 151.7845
388376 AU 2 Newcastle 2899 -32.9278 151.7845
Is there any way to remove the duplicates? How would I know which duplicate to remove and which ones to keep?
Thanks