shutdown

线程池的几种常见的创建的方式

匆匆过客 提交于 2019-12-02 18:00:31
一:创建大小不固定的线程池 二:创建固定数量线程的线程池 三:创建单线程的线程池 四:创建定时线程 1.创建大小不固定的线程池 package com.peace.pms.Test; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; /** * @Author: cxx * @Date: 2018/3/3 17:16 */ public class ThreadPoolDemo { public static class Taskdemo implements Runnable{ @Override public void run() { for(int i=0;i<10;i++){ System.out.println(Thread.currentThread().getName()+":"+i); } } } public static void main(String[] args) { ExecutorService es=Executors.newCachedThreadPool(2); for(int i=0;i<10;i++){ Taskdemo tc=new Taskdemo(); es.execute(tc); } es.shutdown(); }

Windows 7 remote shutdown: Access denied(5) [closed]

断了今生、忘了曾经 提交于 2019-12-02 17:33:33
I am trying to force a remote shutdown from my laptop to my PC: machine> shutdown -m \\192.168.2.10 -s -f -t 0 192.168.2.10: Access denied(5) I am in a WLAN/LAN environment: Laptop is in WLAN with IP 192.168.2.100 (DHCP), Win 7 (64 bit) PC is connected via LAN 192.168.8.10 (static), Win 7 (32 bit) Router IP 192.168.2.1 /Subnetmask 255.255.255.0 Access to PC is restricted by username and password. What do I have to change about the command or about the systems configurations - whilst access restrictions have to remain as is? You can use the NET USE command to authenticate on the remote server

Shutdown MSSQL server from perl script DBI

爱⌒轻易说出口 提交于 2019-12-02 17:21:37
问题 I'm writing a perl script in which I've to shutdown my mssql server ,do some operation and then I've to restart it.I know 1 way is to use netstat to stopt the service but I cann't use that. So I tried installing DBI and DBD::ODBC module.I'm able to connect and execute queries by following code use DBI; my $data_source = q/dbi:ODBC:AUTOMATION_WOW64/; my $user = q/pa/; my $password = q/DCE/; # Connect to the data source and get a handle for that connection. my $dbh = DBI->connect($data_source,

postgresql9.5编译安装体验

守給你的承諾、 提交于 2019-12-02 17:02:52
实验环境: centos7.6 pgsql9.5 源码编译安装 实验目的: 体验源码编译安装pgsql 01、download https://ftp.postgresql.org/pub/source/v9.5.19/postgresql-9.5.19.tar.bz2 02、requirement yum install -y ncurses-devel readline-devel zlib-devel 03、add_user postgres && pgdata useradd postgres mkdir -p /pgdata/{data,archive} //创建数据及归档存储目录 su - postgres //配置环境变量 tee <<-'EOF' >>.bash_profile export PGHOME=/pgdata export PGDATA=/pgdata/data export PATH=$PGHOME/bin:$PATH export LD_LIBRARY_PATH=$PGHOME/lib EOF source .bash_profile 04、compile/setup [root@lab-250 ~]# tar jxf postgresql-9.5.19.tar.bz2 //解压 [root@lab-250 ~]# cd postgresql-9.5

IRF

流过昼夜 提交于 2019-12-02 16:29:18
1.IRF域简介 域是一个逻辑概念,设备通过IRF链路连接在一起就组成一个IRF,这些成员设备的集合就是一个IRF域。上图之中有2个IRF domain,分别是IRF1的 domain10 和 IRF 2的 doamin 20。 在多个IRF均使用LACP MAD检测,且IRF间存在LACP MAD检测链路时,需要为各IRF配置不同的IRF域编号。在IRF间不存在LACP MAD检测链路,或使用BFD MAD、ARP MAD检测的情况下,不需要配置IRF域编号。 1.1 配置命令 system-view irf domain domain-id (可选,默认irf的与编号为0) 2.IRF配置 主机sw1 2.1 将sw1要做堆叠的口手动shuntdown sw1: int range Ten-GigabitEthernet 1/0/51 to Ten-GigabitEthernet 1/0/52 shutdown 2.2 设置sw1 irf member id(默认为1)和优先级(默认为1) sw1 irf member 1 priority 5 2.3.创建逻辑 irf-port端口,把物理端口加入irf-port中 sw1 irf-port 1/1 //创建irf port,并进入irf-port 视图模式 port group interface Ten

note4--鸟哥的Linux私房菜

蓝咒 提交于 2019-12-02 16:06:00
《鸟哥的 Linux 私房菜》 note4 第五章、首次登陆与在线求助 , man page 1 、重新启动 x window ( 1 )注销 -- 〉重新登陆 ( 2 ) [Alt]+[Ctrl]+[Backspace] 2 、 X window 与文本模式(又叫终端机接口 \terminal\console )的切换 文字接口(执行等级 run level3 ): 登陆 tty1~tty6 终端机 :[Ctrl]+[Alt]+[F1]~[F6] 图形接口桌面( run level 5 ) 登陆: [Ctrl]+[Alt]+[F7] 以纯文本环境启动 Linux ,在 tty1~tty6 热议一个终端接口登陆后, [fangzheng@www~]$ startx 字型服务器( X Font Server,xfs ) 修改 run level* :用 vi 修改 /etc/inittab 3 、 tty1 CentOS release 5.3(Final) Kernel 2.6.18-128.el5 on an i686 以上两行来自 /etc/issue 以上核心版本: 2.6.18-128.el5, 硬件等级 i686 如果 64 位 linux 版本安装到 64 位 PC ,硬件等级为 [X86-64] 4 、注销 Linux $ exit 文本模式登陆后取得的程序成为壳(

Shutting down computer with nasm

浪尽此生 提交于 2019-12-02 13:40:19
Is it possible to shut down or kill the power (is there a difference?) to a computer from nasm. I know you can use this to reboot: mov al, 0xFE out 0x64, al Is there an equivalent for shutting down? I am making my own 16 bit OS. The code you have is not guaranteed to work. It relies on two facts: the OS maps the physical IO memory into the process memory space. the machine has BIOS. Neither of the two might be true. The only reliable way to reboot or shutdown the machine programatically is to call the corresponding OS API. An alternative to calling the OS API (which you need, since you are

HttpClient的连接管理器相关

情到浓时终转凉″ 提交于 2019-12-02 11:26:38
注意 public class ClientEvictExpiredConnections { public static void main(String[] args) throws Exception { PoolingHttpClientConnectionManager cm = new PoolingHttpClientConnectionManager(); // 设置最大连接数 cm.setMaxTotal(200); // 设置每个主机地址的并发数 cm.setDefaultMaxPerRoute(20); new IdleConnectionEvictor(cm).start(); } public static class IdleConnectionEvictor extends Thread { private final HttpClientConnectionManager connMgr; private volatile boolean shutdown; public IdleConnectionEvictor(HttpClientConnectionManager connMgr) { this.connMgr = connMgr; } @Override public void run() { try { while (!shutdown)

远程管理常用命令

别等时光非礼了梦想. 提交于 2019-12-02 10:55:50
目标 关机/重启 shutdown 查看或配置网卡信息 ifconfig ping 远程登录 ssh 提示: 不指定选项和参数,默认表示 1 分钟之后 关闭电脑 远程维护服务器时,最好不要关闭系统,而应该重新启动系统 常用命令示例 重新启动操作系统,其中 now 表示现在 $ shutdown -r now 立刻关机,其中 now 表示现在 $ shutdown now 系统在今天的 20:25 会关机 $ shutdown 20:25 系统再过十分钟后自动关机 $ shutdown +10 取消之前指定的关机计划 $ shutdown -c 查看或配置网卡信息 2.1 网卡 和 IP地址网卡 网卡是一个专门负责网络通讯的硬件设备 IP 地址是设置在网卡上的地址信息 我们可以把 电脑 比作 电话,网卡 相当于 SIM 卡,IP 地址 相当于 电话号码 IP 地址 每台联网的电脑上都有 IP 地址,是保证电脑之间正常通讯的重要设置 注意:每台电脑的 IP 地址不能相同,否则会出现 IP 地址冲突,并且没有办法正常通讯提示:有关 IP 地址的详细内容,在就业班会详细讲解! 2.2 ifconfig ifconfig 可以查看/配置计算机当前的网卡配置信息 查看网卡配置信息 $ ifconfig 查看网卡对应的 IP 地址 $ ifconfig | grep inet 提示

Code to Restart , Shutdown and enter in to Download Mode for Android Phones?

旧时模样 提交于 2019-12-02 10:28:26
问题 Hi all I am just curious to find out some code that can pro-grammatically REBOOT , SHUTDOWN and enter in to DOWNLOAD MODE mobile phones with. I have been exhausted scouring the internet to find something to do with this but have failed. Does any one have any ideas/links/references ? 回答1: If your app is signed with the system key, you can use reboot(). On the other hand, if you have root you can still do it (this doesn't work on a few ROMs, mainly a few stock HTC ones. Shutdown: try { Process