echo mntr | nc localhost 2181
zk_version 3.4.6-78--1, built on 12/06/2018 12:30 GMT
zk_avg_latency 319
zk_max_latency 13406
zk_min_latency 0
zk_packets_received 1847226
zk_packets_sent 1782230
zk_num_alive_connections 437
zk_outstanding_requests 0
zk_server_state follower
zk_znode_count 3188127
zk_watch_count 21
zk_ephemerals_count 27
zk_approximate_data_size 651278666
zk_open_file_descriptor_count 473
zk_max_file_descriptor_count 4096
zk_fsync_threshold_exceed_count 1
zk_znode_count 3188127
For me zk_znode_count looks very high
Please can anyone help me to how to list all zonode.
After checking znodes details h ave to decide to delete on based on what criteria....?
It would be help full because of my cluster service are always in acive/active or standby/standby mode.
Thanks in Adv,
I have in /etc/logrotate.d/mikrotik :
/var/log/mikrotik.log {
rotate 2
daily
compress
dateext
dateyesterday
dateformat .%Y-%m-%d
postrotate
#/usr/sbin/invoke-rc.d syslog-ng reload >/dev/null
rsync -avH /var/log/mikrotik*.gz /backup/logs/mikrotik/
/usr/lib/rsyslog/rsyslog-rotate
endscript
}
The mikrotik.log.YYYY-MM-DD.gz file is created daily
The problem is that rsync in postrotate doesn't copy the last file. For example, on September 25, 2021, there are such files in /var/log:
-rw-r ----- 1 root adm 37837 Sep 24 23:49 mikrotik.log. 2021-09-24.gz
-rw-r ----- 1 root adm 36980 Sep 25 23:55 mikrotik.log. 2021-09-25.gz
and in /backup/logs/mikrotik/ are only:
-rw-r ----- 1 root adm 35495 Sep 23 00:00 mikrotik.log. 2021-09-22.gz
-rw-r ----- 1 root adm 36842 Sep 23 23:58 mikrotik.log. 2021-09-23.gz
-rw-r ----- 1 root adm 37837 Sep 24 23:49 mikrotik.log. 2021-09-24.gz
There is no file mikrotik.log.2021-09-25.gz from Sep 25 23:55 it will not be copied until the next rotation.
How to make a file packed today copied by postrotate ?
Problem solved.
It relied on the order in which the operations were performed.
Lgrotate does a 'postrotate' section before compressing to .gz.
The solution to the problem was to change the name from 'postrotate' to 'lastaction'.
I am trying to touch a file(for referencing date) with a future date something like -
Current date - $date
Fri Jan 6 03:59:55 EST 2017
touch -t 201702032359.59 /var/tmp/ME_FILE_END
on checking the timestamp of the file as -
$ ls -lrt /var/tmp/ME_FILE_END
getting an output with only date and not the entire timestamp(hhmm.sec)
-rw-r--r-- 1 abcproc abc 0 Feb 3 2017 /var/tmp/ME_FILE_END
But for a date with is less than or equal to current it gives correct result -
touch -t 201612010000.00 /var/tmp/ME_FILE_START
ls -lrt /var/tmp/ME_FILE_START
-rw-r--r-- 1 abcproc abc 0 Dec 1 00:00 /var/tmp/ME_FILE_START
Can someone please suggest why this discrepancy ?
It's just the way ls displays the date. When far from now, the modification time is not displayed.
If you want details regarding the last access / modification / change time, you should be using stat.
stat /var/tmp/ME_FILE_END
You will see the expected output.
For example:
[10:29:41]dabi#gaia:~$ touch -t 201702032359.59 /var/tmp/ME_FILE_END
[10:29:43]dabi#gaia:~$ ls -ltr /var/tmp/ME_FILE_END
-rw-rw-r-- 1 dabi dabi 0 feb. 3 2017 /var/tmp/ME_FILE_END
[10:29:47]dabi#gaia:~$ stat /var/tmp/ME_FILE_END
File : '/var/tmp/ME_FILE_END'
Size : 0 Blocks : 0 I/O blocks : 4096 empty file
Device : 803h/2051d Inode : 5374373 Links : 1
Access : (0664/-rw-rw-r--) UID : ( 1000/ dabi) GID : ( 1000/ dabi)
Access : 2017-02-03 23:59:59.000000000 +0100
Change : 2017-02-03 23:59:59.000000000 +0100
Change : 2017-01-06 10:29:43.364630503 +0100
Birth : -
i folowed this link to calibrate touchscreen: http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/.
ls -la /dev/input/
total 0
drwxr-xr-x 4 root root 240 Jul 12 18:38 .
drwxr-xr-x 15 root root 3460 Jul 12 18:38 ..
drwxr-xr-x 2 root root 140 Jul 12 18:38 by-id
drwxr-xr-x 2 root root 140 Jul 12 18:38 by-path
crw-rw---- 1 root input 13, 64 Jul 12 18:38 event0
crw-rw---- 1 root input 13, 65 Jul 12 18:38 event1
crw-rw---- 1 root input 13, 66 Jul 12 18:38 event2
crw-rw---- 1 root input 13, 67 Jul 12 18:38 event3
crw-rw---- 1 root input 13, 68 Jul 12 18:38 event4
crw-rw---- 1 root input 13, 63 Jul 12 18:38 mice
crw-rw---- 1 root input 13, 32 Jul 12 18:38 mouse0
crw-rw---- 1 root input 13, 33 Jul 12 18:38 mouse1
root#raspberrypi:/sys/devices/virtual/input# cat input4/uevent
PRODUCT=0/0/0/0
NAME="FT5406 memory based driver"
PROP=2
EV=b
KEY=400 0 0 0 0 0 0 0 0 0 0
ABS=2608000 3
MODALIAS=input:b0000v0000p0000e0000-e0,1,3,k14A,ra0,1,2F,35,36,39,mlsfw
root#raspberrypi:~# cat /etc/ts.conf
# Uncomment if you wish to use the linux input layer event interface
module_raw input
# Uncomment if you're using a Sharp Zaurus SL-5500/SL-5000d
# module_raw collie
# Uncomment if you're using a Sharp Zaurus SL-C700/C750/C760/C860
# module_raw corgi
# Uncomment if you're using a device with a UCB1200/1300/1400 TS interface
# module_raw ucb1x00
# Uncomment if you're using an HP iPaq h3600 or similar
# module_raw h3600
# Uncomment if you're using a Hitachi Webpad
# module_raw mk712
# Uncomment if you're using an IBM Arctic II
# module_raw arctic2
module pthres pmin=1
module variance delta=30
module dejitter delta=100
module linear
I only get response when configuring X with xinput_calibrator. When i enter this command
sudo TSLIB_FBDEVICE=/dev/fb0 TSLIB_TSDEVICE=/dev/input/event1 ts_calibrate
I get optput
xres = 800, yres = 480
selected device is not a touchscreen I understand
Can someone please help me,
Thanks in advance.
I don't have a solution for this, but I believe that it is related to the problem of touches being treated as mouseovers. This bug has been reported several times, but never actually fixed
https://gitlab.gnome.org/GNOME/gtk/-/issues/945
https://bugzilla.gnome.org/show_bug.cgi?id=789041
https://bugs.launchpad.net/ubuntu-mate/+bug/1792787
A bugzilla.gnome.org user named niteshgupta16 created a script that solves this problem, but it was uploaded to pasting/sharing service called hastebin at https://www.hastebin.com/uwuviteyeb.py.
Hastebin deletes files that have not been accessed within 30 days. Since hastebin is a javascript-obfuscated service, this file is not available on archive.org.
I am unable to find an email for niteshgupta16 in order to ask him if he still has uwuviteyeb.py.
I am having some issue here using LWP::Simple to get ftp site content in Perl. It would work fine if the site used http, but not ftp, for example ftp://ftp.di.uminho.pt/pub/ctan/fonts/. But in my firefox browser, I can view the content as html.
So how to get the html of the site in this case?
LWP returns a document of the type text/ftp-dir-listing for a FTP directory. Use File::Listing to parse it.
$ GET -USe ftp://ftp.di.uminho.pt/pub/ctan/fonts/
GET ftp://ftp.di.uminho.pt/pub/ctan/fonts/
User-Agent: lwp-request/6.00 libwww-perl/6.02
200 OK
Server: --------- Welcome to Pure-FTPd [privsep] ----------
Content-Length: 32208
Content-Type: text/ftp-dir-listing
Client-Date: Mon, 06 Jun 2011 21:32:45 GMT
Client-Request-Num: 1
drwxr-xr-x 257 500 50 20480 May 30 06:27 .
drwxrwsr-x 18 500 50 4096 Jun 6 20:02 ..
drwxr-xr-x 2 500 500 4096 Apr 7 19:13 Asana-Math
-rw-r--r-- 1 500 500 573482 Apr 7 19:14 Asana-Math.zip
drwxr-xr-x 2 500 50 4096 May 20 2005 CJK
-r--r--r-- 1 500 500 20384230 May 20 2005 CJK.zip
drwxr-xr-x 2 500 50 4096 May 20 2005 DayRoman
-r--r--r-- 1 500 500 573352 May 20 2005 DayRoman.zip
drwxr-xr-x 2 500 50 4096 Sep 7 2007 LuxiMono
-r--r--r-- 1 500 500 199660 May 6 2005 LuxiMono.zip
lrwxrwxrwx 1 500 50 8 Oct 14 2005 MnSymbol -> mnsymbol
lrwxrwxrwx 1 500 50 12 Oct 14 2005 Mnsymbol.zip -> mnsymbol.zip
['Asana-Math', 'd', undef, 1302196380, 16877],
['Asana-Math.zip', 'f', 573482, 1302196440, 33188],
['CJK', 'd', undef, 1116540000, 16877],
['CJK.zip', 'f', 20384230, 1116540000, 33060],
['DayRoman', 'd', undef, 1116540000, 16877],
['DayRoman.zip', 'f', 573352, 1116540000, 33060],
['LuxiMono', 'd', undef, 1189116000, 16877],
['LuxiMono.zip', 'f', 199660, 1115330400, 33060],
['MnSymbol', 'l mnsymbol', 8, 1129240800, 41471],
['Mnsymbol.zip', 'l mnsymbol.zip', 12, 1129240800, 41471],
You probably want to use Net::FTP instead:
use Net::FTP;
$ftp = Net::FTP->new("some.host.name", Debug => 0)
or die "Cannot connect to some.host.name: $#";
$ftp->cwd("/pub")
or die "Cannot change working directory ", $ftp->message;
$ftp->get("that.file")
or die "get failed ", $ftp->message;
$ftp->quit;
Firefox will internally generate an HTML document when you are viewing an FTP directory. The FTP server won't provide one.
If you want one, then you will have to iterate over the files and directories and generate your own.