LINUX.ORG.RU

Сообщения gelius

 

Тормоза в виртуалке.

Долго боролся с подлагиваниями в виртуалках с линуксом в качестве гостевой системы.
Тестил vmware и virtualbox на разном железе с разными дистрибутивами и разнообразными графичискими средами. Забил в итоге.
Решил заценить whonix. Не смотря на тяжелый kde, работает без лагов. Вот чешу репу. Как?

 

gelius
()

неубиваемый процесс

coinonatx@GL12:~/CoinonatX/src$ ps aux | grep coinonatxd
coinona+ 20281  0.7  0.6 1141808 109616 ?      SLsl Sep10  16:11 ./coinonatxd -daemon
coinona+ 30039  0.0  0.0  12728  2152 pts/0    S+   23:01   0:00 grep coinonatxd
coinonatx@GL12:~/CoinonatX/src$ killall coinonatxd
coinonatx@GL12:~/CoinonatX/src$ ps aux | grep coinonatxd
coinona+ 20281  0.7  0.6 1141808 109616 ?      SLsl Sep10  16:11 ./coinonatxd -daemon
coinona+ 30045  0.0  0.0  12728  2288 pts/0    S+   23:01   0:00 grep coinonatxd
coinonatx@GL12:~/CoinonatX/src$ kill 20281
coinonatx@GL12:~/CoinonatX/src$ ps aux | grep coinonatxd
coinona+ 20281  0.7  0.6 1141808 109616 ?      SLsl Sep10  16:11 ./coinonatxd -daemon
coinona+ 30054  0.0  0.0  12728  2144 pts/0    S+   23:01   0:00 grep coinonatxd
coinonatx@GL12:~/CoinonatX/src$ sudo killall coinonatxd
[sudo] password for coinonatx:
coinonatx@GL12:~/CoinonatX/src$ ps aux | grep coinonatxd
coinona+ 20281  0.7  0.6 1141808 109616 ?      SLsl Sep10  16:11 ./coinonatxd -daemon
coinona+ 30066  0.0  0.0  12728  2232 pts/0    S+   23:02   0:00 grep coinonatxd
coinonatx@GL12:~/CoinonatX/src$ ./coinonatxd getinfo
.... long time freez. don't answer.

 

gelius
()

Error: Unable to bind to 0.0.0.0:port on this computer

Порты пробовал разные. Порты ничем не заняты.

 

gelius
()

максимальное кол-во строк в терминале?

Длинные маны не помещаются в терминал, можно просмотреть только определенное количество строк, расположенное в конце.
Как изменить этот параметр?

 

gelius
()

Проблема со сборкой qt приложения

Debian8 stable.

src/qt/bitcoingui.cpp:65:21: fatal error: QScroller: No such file or directory
 #include <QScroller>
                     ^
compilation terminated.

 

gelius
()

Не собирается Clang Static Analyzer

Последняя версия.
Debian 8. cmake-3.9.1.

CMakeFiles/cxx_objects.dir/__/src/strstream.cpp.o:(.data.rel.ro._ZTINSt3__19strstreamE[_ZTINSt3__19strstreamE]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
CMakeFiles/cxx_objects.dir/__/src/strstream.cpp.o:(.data.rel.ro._ZTINSt3__110ostrstreamE[_ZTINSt3__110ostrstreamE]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
CMakeFiles/cxx_objects.dir/__/src/strstream.cpp.o:(.data.rel.ro._ZTINSt3__110istrstreamE[_ZTINSt3__110istrstreamE]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
CMakeFiles/cxx_objects.dir/__/src/strstream.cpp.o:(.data.rel.ro._ZTINSt3__112strstreambufE[_ZTINSt3__112strstreambufE]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
CMakeFiles/cxx_objects.dir/__/src/system_error.cpp.o: In function `std::__1::generic_category()':
/usr/bin/llvm/llvm/projects/libcxx/src/system_error.cpp:169: undefined reference to `__cxa_guard_acquire'
/usr/bin/llvm/llvm/projects/libcxx/src/system_error.cpp:169: undefined reference to `__cxa_guard_release'
CMakeFiles/cxx_objects.dir/__/src/system_error.cpp.o: In function `std::__1::system_category()':
/usr/bin/llvm/llvm/projects/libcxx/src/system_error.cpp:211: undefined reference to `__cxa_guard_acquire'
/usr/bin/llvm/llvm/projects/libcxx/src/system_error.cpp:211: undefined reference to `__cxa_guard_release'
CMakeFiles/cxx_objects.dir/__/src/system_error.cpp.o: In function `std::__1::__throw_system_error(int, char const*)':
/usr/bin/llvm/llvm/projects/libcxx/src/system_error.cpp:289: undefined reference to `__cxa_allocate_exception'
/usr/bin/llvm/llvm/projects/libcxx/src/system_error.cpp:289: undefined reference to `__cxa_throw'
/usr/bin/llvm/llvm/projects/libcxx/src/system_error.cpp:289: undefined reference to `__cxa_free_exception'
CMakeFiles/cxx_objects.dir/__/src/system_error.cpp.o:(.data.rel.ro._ZTVNSt3__112__do_messageE[_ZTVNSt3__112__do_messageE]+0x20): undefined reference to `__cxa_pure_virtual'
CMakeFiles/cxx_objects.dir/__/src/system_error.cpp.o:(.data.rel.ro._ZTVNSt3__114error_categoryE[_ZTVNSt3__114error_categoryE]+0x20): undefined reference to `__cxa_pure_virtual'
CMakeFiles/cxx_objects.dir/__/src/system_error.cpp.o:(.data.rel.ro._ZTVNSt3__114error_categoryE[_ZTVNSt3__114error_categoryE]+0x40): undefined reference to `__cxa_pure_virtual'
CMakeFiles/cxx_objects.dir/__/src/system_error.cpp.o:(.data.rel.ro._ZTINSt3__123__system_error_categoryE[_ZTINSt3__123__system_error_categoryE]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
CMakeFiles/cxx_objects.dir/__/src/system_error.cpp.o:(.data.rel.ro._ZTINSt3__124__generic_error_categoryE[_ZTINSt3__124__generic_error_categoryE]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
CMakeFiles/cxx_objects.dir/__/src/system_error.cpp.o:(.data.rel.ro._ZTINSt3__112system_errorE[_ZTINSt3__112system_errorE]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
CMakeFiles/cxx_objects.dir/__/src/system_error.cpp.o:(.data.rel.ro._ZTINSt3__112__do_messageE[_ZTINSt3__112__do_messageE]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
CMakeFiles/cxx_objects.dir/__/src/system_error.cpp.o:(.data.rel.ro._ZTINSt3__114error_categoryE[_ZTINSt3__114error_categoryE]+0x0): undefined reference to `vtable for __cxxabiv1::__class_type_info'
CMakeFiles/cxx_objects.dir/__/src/thread.cpp.o: In function `std::__1::__thread_local_data()':
/usr/bin/llvm/llvm/projects/libcxx/src/thread.cpp:128: undefined reference to `__cxa_guard_acquire'
/usr/bin/llvm/llvm/projects/libcxx/src/thread.cpp:128: undefined reference to `__cxa_guard_release'
/usr/bin/llvm/llvm/projects/libcxx/src/thread.cpp:128: undefined reference to `__cxa_guard_abort'
CMakeFiles/cxx_objects.dir/__/src/typeinfo.cpp.o:(.data.rel.ro._ZTISt9type_info[_ZTISt9type_info]+0x0): undefined reference to `vtable for __cxxabiv1::__class_type_info'
CMakeFiles/cxx_objects.dir/__/src/variant.cpp.o:(.data.rel.ro._ZTISt18bad_variant_access[_ZTISt18bad_variant_access]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
CMakeFiles/cxx_objects.dir/__/src/vector.cpp.o: In function `__throw_length_error':
/usr/bin/llvm/llvm/projects/libcxx/include/stdexcept:225: undefined reference to `__cxa_allocate_exception'
/usr/bin/llvm/llvm/projects/libcxx/include/stdexcept:225: undefined reference to `__cxa_throw'
/usr/bin/llvm/llvm/projects/libcxx/include/stdexcept:225: undefined reference to `__cxa_free_exception'
CMakeFiles/cxx_objects.dir/__/src/vector.cpp.o: In function `__throw_out_of_range':
/usr/bin/llvm/llvm/projects/libcxx/include/stdexcept:236: undefined reference to `__cxa_allocate_exception'
/usr/bin/llvm/llvm/projects/libcxx/include/stdexcept:236: undefined reference to `__cxa_throw'
/usr/bin/llvm/llvm/projects/libcxx/include/stdexcept:236: undefined reference to `__cxa_free_exception'
collect2: error: ld returned 1 exit status
projects/libcxx/lib/CMakeFiles/cxx_shared.dir/build.make:128: recipe for target 'lib/libc++.so.1.0' failed
make[2]: *** [lib/libc++.so.1.0] Error 1
CMakeFiles/Makefile2:14266: recipe for target 'projects/libcxx/lib/CMakeFiles/cxx_shared.dir/all' failed
make[1]: *** [projects/libcxx/lib/CMakeFiles/cxx_shared.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2

 

gelius
()

безопасный docker?

Цель - установить в контейнер недоверенный софт.
Контейнер не должен уйти в сторонние репозитории.
docker пригоден для этого?
Стоит поднимать демон docker от рута, или создать для этой цели отдельного юзера?

 

gelius
()

Уникальные идентификаторы оборудования

Есть возможность запретить считывание серийников материнки, винта и любых других ид, если они существуют?

 

gelius
()

Запуск демона без root

/etc/systemd/system/имя_пакета.service:

[Unit]
Description=имя_пакета
After=network.target

[Service]
Type=simple
ExecStart=/usr/bin/имя_пакета -options

[Install]
WantedBy=multi-user.target
Запускаем: systemctl start имя_пакета.
Пакет работает от рута.
Что, если пакет должен запускаться от непривилегированного пользователя из /home/user/?
screen и nohup не хочу.

 

gelius
()

Пользователь с доступом только к ftp

Как создать?

 

gelius
()

Не сохранять логи shell

Как сделать только для выбранных пользователей?

 

gelius
()

сохранить вывод консоли в файл

some_command parameters > patch/logfile.txt


some_command parameters | tee -a patch/logfile.txt

Ничего не пишется, никакой реакции в виде ошибок.
setterm -dump -file patch/logfile.txt
setterm: cannot read /dev/vcsa: Permission denied

'patch/logfile.txt' существует с правами '777'. Как?

 

gelius
()

Проблема с mysql

Лог забит записями вида:
[Note] Access denied for user "@'localhost' (using password: NO)
Как узнать, что постоянно дергает бд?
И момент падения:

[Note] Giving 256 client threads a chance to die gracefully
[Note] Shutting down slave threads
[Note] Forcefully disconnecting 2 remaining clients
[Warning] /usr/sbin/mysqld: Forcing close of thread 106725  user: 'my_table'
[Warning] /usr/sbin/mysqld: Forcing close of thread 763  user: 'my_table'
[Note] Event Scheduler: Purging the queue. 0 events

 

gelius
()

openvpn + соединение по воздуху

При использовании openvpn поверх проводного подключения, потери скорости терпимы. Подключаюсь через 4g usb модем и скорость падает на порядок.

 

gelius
()

несколько сетевых карт

Kali в vmware подхватывает 3g модем на лету, видит его как новую сетевую. Но только если нет виртуальных сетевых карт. Опробовал еще несколько дистрибутивов, все аналогично.
Цель раздать 3g интернет с одной гостевой ос на несколько других гостевых.

 

gelius
()

/etc/init.d

Существует универсальный скрипт, для запуска любого пакета из /etc/init.d?

 

gelius
()

tshark & ssl

Я завис:

tshark -n -o "ssl.desegment_ssl_records: TRUE" -o "ssl.desegment_ssl_application_data: TRUE" -o "ssl.keys_list: 0.0.0.0,0,data,/patch/server.key" -o "ssl.debug_file: SSL-Decrypt.log" -i eth0 -Y "tcp.port==443" -T fields -e data.data

Выводит такое:
*...ab:00:ec:60:e7...*
Что это может быть и как расшифровать?

 

gelius
()

xrdp + gnom + debian8

Запустил xrdp на серваке debian8

ps aux | grep xrdp
xrdp     27212  0.0  0.0  21032   472 ?        S    09:30  0:00 /usr/sbin/xrdp
root     27214  0.0  0.0  33532  1868 ?        S    09:30
0:00 /usr/sbin/xrdp-sesman
netstat -anp | grep 3389
tcp        0      0 0.0.0.0:3389       0.0.0.0:*               LISTEN      27212/xrdp
xrdp-sesman.log:
[CORE ] starting sesman with pid 26638
[INFO ] listening...
[INFO ] shutting down sesman 1
[CORE ] starting sesman with pid 27214
[INFO ] listening...
Тут похоже нормально все. xorg нужно стартавать, или он автоматом запускается при подключении rdp? Подключение не проходит, куда копать не понятно. xorg из консоли не запускается:
systemctl status gdm.service
● gdm.service - GNOME Display Manager
   Loaded: loaded (/lib/systemd/system/gdm.service; static)
   Active: failed (Result: start-limit) since Mon 2017-04-10 10:04:05 CEST; 34s ago
  Process: 29389 ExecStartPre=/bin/sh -c [ "$(cat /etc/X11/default-display-manager 2>/dev/null)" = "/usr/sbin/gdm3" ] (code=exited, status=1/FAILURE)

Apr 10 10:04:04 GL12.worldstream.nl systemd[1]: Triggering OnFailure= dependencies of gdm.service.
Apr 10 10:04:04 GL12.worldstream.nl systemd[1]: Failed to enqueue OnFailure= job: Invalid argument
Apr 10 10:04:05 GL12.worldstream.nl systemd[1]: gdm.service holdoff time over, scheduling restart.
Apr 10 10:04:05 GL12.worldstream.nl systemd[1]: Stopping GNOME Display Manager...
Apr 10 10:04:05 GL12.worldstream.nl systemd[1]: Starting GNOME Display Manager...
Apr 10 10:04:05 GL12.worldstream.nl systemd[1]: gdm.service start request repeated too quickly, refusing to start.
Apr 10 10:04:05 GL12.worldstream.nl systemd[1]: Failed to start GNOME Display Manager.
Apr 10 10:04:05 GL12.worldstream.nl systemd[1]: Unit gdm.service entered failed state.
Apr 10 10:04:05 GL12.worldstream.nl systemd[1]: Triggering OnFailure= dependencies of gdm.service.
Apr 10 10:04:05 GL12.worldstream.nl systemd[1]: Failed to enqueue OnFailure= job: Invalid argument

 

gelius
()

нужна помощь с electrum-server

Ставил по этому ману: https://github.com/spesmilo/electrum-server/blob/master/HOWTO.md
Все вроде нормально, но подключение к моему серверу не проходит.
Нужные порты открыты, на них висит electrum-server.
Не очень понятен Step 11. (Finally!) Run Electrum server
Предполагается, что electrum-server должен полностью синхронизировать свою бд с блокчейн установленного на этой машине bitcoind?
После 340000 блоков синхронизация пошла очень медленно, и такими темпами не завершится никогда.
Связаться с девелопером не удается, и ангельский у меня на очень низком уровне.

 

gelius
()

вытащить строки из середины файла

Забираю из файла первые 1000 строк таким образом:

curl -s 'http://domain.com/1.csv' | head -n 1000 > /patch/2.csv

Как забрать строки из середины файла, допустим с 500 по 1500?

 

gelius
()

RSS подписка на новые темы