• Home
  • Cisco
  • Exchange
  • Linux
  • Navision
  • Network
  • Virtualization
  • Windows
  • About
  •  

    Windows 2008 – Use a NTP for time updates

    October 28th, 2013

    net stop w32time
    w32tm /config /syncfromflags:manual /manualpeerlist:”ntp.siminn.dk”
    w32tm /config /reliable:yes
    net start w32time
    w32tm /query /configuration


    Find all files older then…

    October 21st, 2013

    find /www/website/www/ -newermt $(date +%Y-%m-%d -d ’10 day ago’) -type f -print

     


    Search text inside files

    October 18th, 2013

    grep -R email@emailtest.local /www/folder/

    This searches for email@emailtest.local inside files in a folder and all sub folders.


    Stop Exim if a lage number of emails are in the queue

    October 16th, 2013

    In this example, Exim4 stops if the queue grows lager then 100

    #!/bin/bash
    TERM=linux
    export TERM
    _limit=100
    clear;
    _queue=”`/usr/sbin/exim -bpc`”
    if [ “$_queue” -ge “$_limit” ]; then
    /etc/init.d/exim4 stop
    fi


    Synology – Speedup RAID rebuild time

    October 3rd, 2013

    A rebuild of a failed disk can by design take two days.
    If you raise the “speed limit” it can go faster.

    /proc/sys/dev/raid
    Have two files:
    speed_limit_min
    speed_limit_max

    Old versions of DSM (Synology firmware) has a limit in “speed_limit_min” of 1000.
    New versions have 10000.
    Remember to use the newest version of DSM, but you can still edit the value by hand.
    echo 20000 > /proc/sys/dev/raid/speed_limit_min


    Exit mobile version