powershell get-eventlog can not get all the events on 2008r2 server(only one server) - get-eventlog

I met a wired issue on a win2008r2 server, and only on this server
I typped : Get-EventLog -LogName system -Newest 10
I should get the events for the latest(i typed this command on 04/08/2022 15:46 PM CN time ). but I only got the events latest on 6th April, and i'm quite sure there were latest event on 8th(i checked them form the windows eventmanagement),
enter image description here
i'll be very appreciated if anyone could help me :)

Related

Kyocera Taskalfa 2200 photocopier not working on archlinux

I can't print with Kyocera Taskalfa 2200 on my archlinux, it has worked before but now its showing "idle rendering complete" and on localhost its saying "stopped filter failed".
I have deleted and added the printer again multiple times and reinstalled the drivers using yay as well.
any suggestions???
I get this warning when trying to add the printer
In local host it says filter has failed
in queue it says stopped

Cannot install dvdcli on my CentOS 7 host

I tried to install dvdcli on my mesos master.
I typed the following line in the console. But I get forbidden error.
I even tried to do a direct download. Still I get forbidden error.
curl -sSL https://dl.bintray.com/emccode/dvdcli/install | sh -s stable
Can someone help?
Its not just you https://github.com/rexray/dvdcli/issues/37. That was posted back in June and its still unresolved.
Also Dell is no longer funding the open source Code Team initiative https://blog.thecodeteam.com/2018/02/22/final-thank-code-team/ so I'm not sure about the future of the project. I have not been following it closely. I would suggest reaching out to on https://github.com/rexray/dvdcli/issues/37. Hopefully someone will have an answer for you there

Error while runnnig whenever --update-crontab

I am new to cron job. I am getting the following error while running the whenever --update-crontab.
C:\RailsProject>whenever --update-crontab
The system cannot find the path specified.
running cron_job scheduler at Tue Aug 13 14:16:09 +0530 2013
[fail] Couldn't write crontab; try running `whenever' with no options to ensure your schedule file is valid.
Any one please help me on this.
Thnks in Advanced.
unfortunately, the whenever gem only runs on *nix systems (Linux, Mac OSX, BSD, ...) and not on windows.
see https://stackoverflow.com/a/6784889/1065703 for alternatives on windows systems.

Why does zabbix agent UserParameter not work when it is on the same machine with zabbix server

thanks for viewing this question!
I use zabbix to monitor my servers;
There are totally 15 servers;
But one of the agentd not work for UserParameter when the one is on the same machine with the zabbix server proccess
The architecture is like below:
As you see in the picture, the zabbix agentd which is deploy on the same machine with the server, not work well of the UserParameter configuration
the config code I added is like below
UserParameter=mongo.queue[*],/home/admin/tool/queue_monitor.sh $1 | awk '{if($$2 ~ /^[0-9]+/){print $$2}}'
UserParameter=mongo.status[*],/home/admin/tool/mongo-serverStatus.sh $1 | awk '{if($$1 ~ /^[0-9]+/){ print $$1}}'
It is absolutely the same as other agentds's config...
Then I test it with:
zabbix_agentd -t mongo.queue[delayQueue]
It response :
mongo.queue[delayQueue] [m|ZBX_NOTSUPPORTED]
This test run well on the other agentds machine, and will reply a integer number...
zabbix_agentd -t mongo.queue[delayQueue]
mongo.queue[delayQueue] [t|0]
So is it that I should not deploy zabbix agentd on the same machine with the zabbix server?
But that agentd work well on its original tools, such as CPU LOADS, Disk space...
My zabbix version is v2.0.3
./zabbix_agentd -V
Zabbix Agent (daemon) v2.0.3 (revision 30485) (03 October 2012)
Compilation time: Dec 5 2012 17:11:46
You are trying to guess what the problem is. Look at the agent's log, for execs (scripts) the answer is most probably there. If it isn't, disable the passive monitoring of this agent, enable full debug output (DebugLevel=4), then run the zabbix_get of the param and look again at the log. If it's still not there, then strace is your friend.
Finally I found it was a humman error that my workmate had installed another zabbix_agentd on the server, so there's two zabbix agentds on it.
Although I start the agentd process with -c parameter, but when I used -t to test the user parameters , the config file was default link to another file, so that the user parameters I config in the file dose not effect...

Jenkins shows wrong time?

I am running Jenkins on a Linux server and shows the wrong time :(
Situation:
I am running another java app (in tomcat that also runs Jenkins) that shows the correct time in the log files (I use Logback through slf4j).
The bios is set to the UTC time (system clock) like advises here: http://www.linuxsa.org.au/tips/time.html
In Linux it's indicated in /etc/sysconfig/clock that the system clock is set to UTC and in which timezone we are located. I am in UTC+1
Running date command on Linux shows the correct local time. Example:
Sun Jan 8 12:11:35 CET 2012
But Jenkins shows the time plus 1 hour :(...
The jenkins config shows:
user.timezone = Europe/Amsterdam (which is UTC+1).
I think that Jenkins (java) thinks the local clock is set to UTC such that 1 hour is added.
How do I solve this?
If you are running Jenkins with Docker, you can append -e JAVA_OPTS=-Duser.timezone=TZ to docker arguments.
docker run -e JAVA_OPTS=-Duser.timezone=$TZ jenkins
All available TZ can be found here.
See here: https://wiki.jenkins-ci.org/display/JENKINS/Change+time+zone
In short, you can set the system property, either modifying the JVM options,
java -Dorg.apache.commons.jelly.tags.fmt.timeZone=TZ ...
Or changing Jenkins configuration in /etc/default/jenkins (Debian) or /etc/sysconfig/jenkins (Red Hat):
JAVA_ARGS="-Dorg.apache.commons.jelly.tags.fmt.timeZone=America/New_York"
It also mentioned -Duser.timezone="..." is an option, but can cause problems / interfere with other contexts (some vague hand-waving & caveats: time travel is always unpredictable).
In general (in my experience), don't change the system time, since us, our servers & our data live in a global world & should be handling, sending, comparing all times in UTC until the latest possible moment: usually that's the GUI (presentation layer) just before being displayed (...if even then). (Our build system results actually produces data that is fed into another system in another time zone.)
On Jenkins 2.63 on Ubuntu 14.04.5 LTS setting
JAVA_ARGS="-Djava.awt.headless=true -Duser.timezone=America/Los_Angeles"
in /etc/default/jenkins and then doing
sudo service jenkins stop
sudo service jenkins start
worked for me to change the timezone from UTC to PDT.
Put this in a Dockerfile and it will work;
RUN echo "import hudson.model.*;" >
/var/jenkins_home/init.groovy.d/timezone.groovy && \
echo "import jenkins.model.*;" >>
/var/jenkins_home/init.groovy.d/timezone.groovy && \
echo "System.setProperty('org.apache.commons.jelly.tags.fmt.timeZone',
'America/Denver')" >> /var/jenkins_home/init.groovy.d/timezone.groovy
$JENKINS_HOME/init.groovy.d/*.groovy will get executed at start up.
System.setProperty('org.apache.commons.jelly.tags.fmt.timeZone',
'America/Denver')
That sets the timezone.
For official Jenkins Docker image (lts:2.138.1), you should set Jenkins java options to your local TZ. You can use this env. variable in a docker run command or docker-compose as well.
See here: https://wiki.jenkins.io/display/JENKINS/Change+time+zone
JENKINS_JAVA_OPTIONS="-Duser.timezone=Europe/Paris"
In case you have additional slaves you can sync the clock by using ntp. On Linux you can run following commands for each slave:
sudo systemctl stop ntp
sudo ntpdate -qu 0.debian.pool.ntp.org
sudo systemctl restart ntp
sudo systemctl status ntp
The easiest way without restarting Jenkins:
Open "Manage Jenkins" -> "Script Console"
Run the script:
System.setProperty('org.apache.commons.jelly.tags.fmt.timeZone', 'America/New_York')

Resources