П'ятниця, травня 26, 2017

Останні записи

Опублікував Автор: Створено: в Uncategorized

аємо клон IMAX B6 на контролері  ATMEGA32A куплений за 15$ з копійками

потім докуплено на аліекспресі USBISP USBASP  AVR Programmer 1,2$

основні ссилки:





Переглядів: 59
5 1

Опублікував Автор: Створено: в Uncategorized

/вираз/ між ці дві риски поміщаємо вираз

/вираз/ i символ і означає прапорець


Переглядів: 71

Опублікував Автор: Створено: в Uncategorized
# memtester 5000 1
memtester version 4.2.1 (64-bit)
Copyright (C) 2010 Charles Cazabon.
Licensed under the GNU General Public License version 2 (only).

pagesize is 4096
pagesizemask is 0xfffffffffffff000
want 5000MB (5242880000 bytes)
got 5000MB (5242880000 bytes), trying mlock ...locked.
Loop 1/1:
Stuck Address : ok
Random Value : ok
Compare XOR : ok
Compare SUB : ok
Compare MUL : ok
Compare DIV : ok
Compare OR : ok
Compare AND : ok
Sequential Increment: ok
Solid Bits : ok
Block Sequential : ok
Checkerboard : ok
Bit Spread : ok
Bit Flip : ok
Walking Ones : ok
Walking Zeroes : ok
8-bit Writes : ok
16-bit Writes : ok

Переглядів: 81

Опублікував Автор: Створено: в Uncategorized

[ro47 ~]# upsc -l
[ro47 ~]# upsc myups

battery.charge: 100
battery.charge.low: 10
battery.charge.warning: 50
battery.mfr.date: 20xxxxx4
battery.runtime: 3060
battery.runtime.low: 120
battery.temperature: 31.5
battery.type: PbAc
battery.voltage: 27.4
battery.voltage.nominal: 24.0
device.mfr: American Power Conversion
device.model: Smxxxxx00
device.serial: ASxxxxxxxxx
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.version: 2.6.5
driver.version.data: APC HID 0.95
driver.version.internal: 0.37
input.sensitivity: high
input.transfer.high: 253
input.transfer.low: 208
input.transfer.reason: input voltage out of range
input.voltage: 216.0
output.current: 1.45
output.frequency: 50.0
output.voltage: 216.0
output.voltage.nominal: 220.0
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.delay.start: 30
ups.firmware: 652.12.I
ups.firmware.aux: 4.2
ups.load: 42.9
ups.mfr: American Power Conversion
ups.mfr.date: 20xxxxxx9
ups.model: Smxxxxxxxxx0
ups.productid: 0002
ups.serial: Axxxxxxxxxx
ups.status: OL
ups.test.result: No test initiated
ups.timer.reboot: -1
ups.timer.shutdown: -1
ups.timer.start: -1
ups.vendorid: 051d


Позначки: ups
Переглядів: 80

Опублікував Автор: Створено: в Uncategorized
Переглядів: 115

Опублікував Автор: Створено: в Uncategorized

приблизно така задача

треба пропихнути socket.io через apache

приблизно принцип роботи такий 

Позначки: httpd socket.io
Переглядів: 116

Опублікував Автор: Створено: в Uncategorized


First number after S or U is bootloader number, in S7 Edge we have U4BQA6 witch red number indicate that bootloader is V4
U or S - Update Software or Security Update
4 - number after S or U Bootloader version
B - next version of Android. In example if last (6.1.1) was A next (7.0) will be B
Q - Year, A will be 01, Q- is 17
A - Month of creation of software , A-January, last one was K with was November we did not have L - December (edge users) because last security patch is from November. 
Last number is version of software patch , can be multiple for same month release on different month


Позначки: s7 active
Переглядів: 124

Опублікував Автор: Створено: в Uncategorized
Позначки: iptables Linux raid
Переглядів: 717

Опублікував Автор: Створено: в Uncategorized


This post will show you how to enable or disable a service to start on boot, on a RHEL or CentOS 7.

Check if the service starts on boot

You manage your services on RHEL/CentOS 7 through systemctl, the systemd service manager.

Переглядів: 964

Опублікував Автор: Створено: в Uncategorized
фаервол в LinuxДоброго времени, читатели и гости моего блога. C этой статьи начну серию статей о подсистеме Netfilter/iptables в Linux. В данной статье приведу основные понятия работы netfilter в Linux. Для понимания данной темы, обязательно советую ознакомиться со статьями Основные понятия сетей,Настройка сети в Linux, диагностика и мониторинг и Настройка и управление сетевой подсистемой Linux (iproute2).
Переглядів: 374

Опублікував Автор: Створено: в Uncategorized




  • We're planning to purchase and roll out a bunch of new servers loaded up with solid-state disks in hardware-raid configurations and want to get some definitive answers from Red Hat regarding the statements below from the RHEL 6 Storage Administration Guide, i.e., does any of it apply to hardware raid?

    In addition, keep in mind that MD (software raid) does not support discards. In contrast, the logical volume manager (LVM) and the device-mapper (DM) targets that LVM uses do support discards. The only DM targets that do not support discards are dm-snapshot, dm-crypt, and dm-raid45. Discard support for the dm-mirror was added in Red Hat Enterprise Linux 6.1.

    Red Hat also warns that software RAID levels 1, 4, 5, and 6 are not recommended for use on SSDs. During the initialization stage of these RAID levels, some RAID management utilities (such as mdadm) write to all of the blocks on the storage device to ensure that checksums operate properly. This will cause the performance of the SSD to degrade quickly.


Переглядів: 305

Опублікував Автор: Створено: в Uncategorized

echo writemostly >  /sys/block/md127/md/dev-sde1/state

You can enable "write-mostly" for a RAID component in the following way:

echo writemostly > /sys/block/md6/md/dev-sdc6/state and disable it this way:

echo -writemostly > /sys/block/md6/md/dev-sdc6/state If for some reason you cannot set a component of a RAID1 to "write-mostly", you can kick it from the array and re-add it with the write-mostly flag active. This will temporarily lower your redundancy level. Backup before doing this is recomended.

To set /dev/sdc6 from the last example to "write-mostly" would work as follows:

To kick, first set it to "faulty":

mdadm --fail /dev/md6 /dev/sdc6 Then kick it:mdadm --remove /dev/md6 /dev/sdc6 Then add it again:mdadm --add /dev/md6 --write-mostly /dev/sdc6 Wait for the RAID1 resync to complete, and /dev/sdc6 will now only be read when needed.

Переглядів: 318

Опублікував Автор: Створено: в Uncategorized



(updated Feb 29th 2016)

One problem that can comes up with the fantastic Centos Linux distro is that it sticks to the proven but also old packages. I needed some newer features several times. The only (good) way to upgrade Postfix to the newest package is to build it up from the source.

First, we need the link to the newest package (take a look here). In my case, it’s 2.11 stable, so let’s download it:

cd wget http://cdn.postfix.johnriley.me/mirrors/postfix-release/official/postfix-3.1.0.tar.gz tar xvf postfix-3.1.0.tar.gz cd postfix-3.1.0Now we need to isntall the development packages and the dependencies. These are the packages that I needed but You might need to install more, depending on which features You want to compile into it. For a standard featured Postfix MTA with SASL and MySQL support you’ll need the following:

yum install libdb-devel db4-devel cyrus-sasl cyrus-sasl-devel openssl openssl-devel pcre pcre-devel openldap openldap-devel mysql-develLet’s celan up the makefiles now, and build new ones (because by the supplied makefile Postfix won’t be compiled with SASL and SQL support), and at the end let’s build the whole package:

make clean make tidy make makefiles CCARGS='-fPIC -DUSE_TLS -DUSE_SSL -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -DPREFIX=\\"/usr\\" -DHAS_LDAP -DLDAP_DEPRECATED=1 -DHAS_PCRE -I/usr/include/openssl -DHAS_MYSQL -I/usr/include/mysql -I/usr/include/sasl -I/usr/include' AUXLIBS='-L/usr/lib64 -L/usr/lib64/openssl -lssl -lcrypto -L/usr/lib64/mysql -lmysqlclient -L/usr/lib64/sasl2 -lsasl2 -lpcre -lz -lm -lldap -llber -Wl,-rpath,/usr/lib64/openssl -pie -Wl,-z,relro' OPT='-O' DEBUG='-g' makeThe last step (build) will take a while, depeding on the CPU power of Your Linux box. At this moment, if it maneges to build without errors, you’ll have a ready to upgrade package. If not, you will need to yum groupinstall “Development Tools” and retry.

Regarding the arguments about building the makefile (step 3 above), depending on the features You want built in the new Postfix package please refer to the chapter 4.4 of the Postfix documentation. Basically, I never needed anything more than this, except that sometimes I want to use PgSQL instead of MySQL, then you will need to yum install postgresql-devel package and insert the correct arguments when creating the makefile.

One more note: creating the makefile in this example is done for Centos 6.x x64. If you are building for the 32-bit verion you will have to replace all the /usr/lib64 arguments with /usr/lib.

If everything is errorless, perform the update:

make upgradeDone. Please also read the suggested articles during install about the new features, and sugested changes to the master.cf and main.cf files.
Regarding the package, since You done it by compiling from the source, the RPM package will stay at version 2.6.x but when you finally do a service postfix restart you will see:

Dec 3 09:23:56 one postfix/master[31460]: daemon started — version 3.0.3, configuration /etc/postfix

Good luck!

Позначки: postfix
Переглядів: 1217

Опублікував Автор: Створено: в Uncategorized
916 echo -e -n "\x50" > /dev/ttyUSB0
917 echo -e -n "\x51" > /dev/ttyUSB0
918 echo -e -n "\x04" > /dev/ttyUSB0
919 echo -e -n "\x51" > /dev/ttyUSB0
920 echo -e -n "\x04" > /dev/ttyUSB0
921 echo -e -n "\x51" > /dev/ttyUSB0
922 echo -e -n "\x04" > /dev/ttyUSB0
923 echo -e -n "\x50" > /dev/ttyUSB0
924 echo -e -n "\x04" > /dev/ttyUSB0
925 echo -e -n "\xff" > /dev/ttyUSB0
926 echo -e -n "\x04" > /dev/ttyUSB0
927 echo -e -n "\xff" > /dev/ttyUSB0
928 echo -e -n "\x04" > /dev/ttyUSB0
929 echo -e -n "\x50" > /dev/ttyUSB0
930 echo -e -n "\xff" > /dev/ttyUSB0
931 echo -e -n "\x04" > /dev/ttyUSB0
932 echo -e -n "\xff" > /dev/ttyUSB0
933 echo -e -n "\x04" > /dev/ttyUSB0
934 echo -e -n "\x50" > /dev/ttyUSB0
935 echo -e -n "\x04" > /dev/ttyUSB0
936 echo -e -n "\x51" > /dev/ttyUSB0
937 echo -e -n "\x04" > /dev/ttyUSB0
938 echo -e -n "\x51" > /dev/ttyUSB0
939 echo -e -n "\x04" > /dev/ttyUSB0
940 echo -e -n "\x51" > /dev/ttyUSB0
941 echo -e -n "\x04" > /dev/ttyUSB0
942 echo -e -n "\x50" > /dev/ttyUSB0
943 echo -e -n "\x04" > /dev/ttyUSB0
944 echo -e -n "\x50" > /dev/ttyUSB0
945 echo -e -n "\x51" > /dev/ttyUSB0
946 echo -e -n "\x04" > /dev/ttyUSB0
947 echo -e -n "\x50" > /dev/ttyUSB0
948 echo -e -n "\x04" > /dev/ttyUSB0
949 echo -e -n "\x50" > /dev/ttyUSB0
950 echo -e -n "\x04" > /dev/ttyUSB0
951 echo -e -n "\x50" > /dev/ttyUSB0
952 echo -e -n "\x04" > /dev/ttyUSB0
953 echo -e -n "\x50" > /dev/ttyUSB0
954 echo -e -n "\x04" > /dev/ttyUSB0
955 echo -e -n "\x50" > /dev/ttyUSB0
956 echo -e -n "\x51" > /dev/ttyUSB0
957 echo -e -n "\x04" > /dev/ttyUSB0
958 echo -e -n "\x50" > /dev/ttyUSB0
959 echo -e -n "\x04" > /dev/ttyUSB0
960 echo -e -n "\x50" > /dev/ttyUSB0
961 echo -e -n "\x51" > /dev/ttyUSB0
962 echo -e -n "\x04" > /dev/ttyUSB0
963 echo -e -n "\x51" > /dev/ttyUSB0
964 echo -e -n "\x04" > /dev/ttyUSB0
965 echo -e -n "\x51" > /dev/ttyUSB0
966 echo -e -n "\x04" > /dev/ttyUSB0
967 echo -e -n "\x51" > /dev/ttyUSB0
Переглядів: 1137

Опублікував Автор: Створено: в Uncategorized


root@ismo:~# dmesg |grep command [    0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-2.6.32-25-generic root=UUID=b59249ce-9490-400d-a435-4c6669cb53ed ro splash libata.dma=0


[root@sol-fttb ~]# hdparm -tT /dev/sdf

Timing cached reads: 17890 MB in 2.00 seconds = 8953.05 MB/sec
Timing buffered disk reads: 320 MB in 3.01 seconds = 106.40 MB/sec
You have new mail in /var/spool/mail/root
[root@sol-fttb ~]# hdparm -tT /dev/sdg

Timing cached reads: 17310 MB in 2.00 seconds = 8662.82 MB/sec
Timing buffered disk reads: 300 MB in 3.12 seconds = 96.25 MB/sec
[root@sol-fttb ~]#

Переглядів: 1296

Опублікував Автор: Створено: в Uncategorized

hdparm -I /dev/sdf

NCQ (англ. Native Command Queuing — апаратна установка черговості команд) — технологія, що використовується в SATA-пристроях починаючи з SATA/300 для підвищення швидкодії. Пристрої з підтримкою NCQ здатні приймати декілька запитів одночасно та реорганізовувати порядок їх виконання для досягнення максимальної ефективності (продуктивності) з урахуванням внутрішньої архітектури пристрою (мінімізуючи кількість переміщень головок та очікування потрібного сектора на треку). NCQ підвищує продуктивність завдань, пов'язаних з довільним читанням, обробкою даних від двох і більше джерел, одночасну роботу декількох програм. (Типове навантаження для сервера — одночасне виконання запитів від декількох клієнтів).

You may disable NCQ, and use normal READ/WRITE DMA commands, by setting the queue depth to 1:

Переглядів: 1352

Опублікував Автор: Створено: в Uncategorized

cd /usr/local/lib/node_modules/mysql

mkdir mysql

cd mysql

Переглядів: 1359

Опублікував Автор: Створено: в Uncategorized

iptables -L -n -v -x --line-number (подивитися якісь там таблички з байтами і нумераціє...)


iptables -N TRAFFIC_ACCT_IN (додати ланцюжок TRAFFIC_ACCT_IN)

Переглядів: 1292

Опублікував Автор: Створено: в Uncategorized


A few years ago I worked as a Linux system administrator at a small (few hundred users) Internet service provider. Among all the regular system administrator duties, I also had the privilege to write various software and tools for Linux. One of my tasks was to write a tool to record how much traffic each of the clients was using.

The network for this provider was laid out in a very simple way. The gateway to the Internet was a single Linux box, which was a router, a firewall and performed traffic shaping. Now it had to be extended to do traffic accounting as well.

Переглядів: 1319

Опублікував Автор: Створено: в Uncategorized


My Linux nas server connected to APC SmartUPS using usb cable and I would like to detect a power failure. If power is not restored my server must shutdown when the battery is exhausted. How do I configure and use my APC SmartUPS under Debina / Ubuntu / RHEL / CentOS / Fedora / Scientific Linux operating system for power management?

Linux comes with GPL licensed open source apcupsd server ( daemon ) that can be used for power mangement and controlling most of APC's UPS models on Linux, BSD, Unix and MS-Windows operating systems. Apcupsd works with most of APC's Smart-UPS models as well as most simple signalling models such a Back-UPS, and BackUPS-Office. During a power failure, apcupsd will inform the users about the power failure and that a shutdown may occur. If power is not restored, a system shutdown will follow when the battery is exhausted, a timeout (seconds) expires, or runtime expires based on internal APC calculations determined by power consumption rates.

Позначки: apc ups
Переглядів: 1397