Skip to content
Jun 19 15

How to change language on any windows vista/7

by admin

Nice tool to change language on any edition of windows vista/7 can be found here: http://www.froggie.sk/index.html

 

May 7 15

Copy messages from one mailbox to another msExchange 2010

by admin

The first step is to grant the right to export mailboxes to an account in your organization.  In the Exchange Management Shell run the following command.

New-ManagementRoleAssignment –Role “Mailbox Import Export” –User Administrator

Next we need to create the network share that will be used as the file path for the exported PST files.  All that is required here is a network share that the Exchange Trusted Subsystem group has read/write permission to.

With everything configured properly we can now use New-MailboxExportRequest to start the mailbox export.  The only two required parameters for the command are the file path to the export PST file, and the name of the mailbox to export.

[PS] C:\>New-MailboxExportRequest -Mailbox alan.reid -FilePath \\esp-ho-ex2010a\pst\alan.reid.pst
Make sure that service "microsoft exchange mailbox replication" is running.

To view the status of the request use the Get-MailboxExportRequest cmdlet.

[PS] C:\>Get-MailboxExportRequest

Name                                           Mailbox                                        Status
----                                           -------                                        ------
MailboxExport                                  exchangeserverpro.net/Company/User              Queued

When a mailbox export request is completed it remains on the server until it is removed by an administrator using Remove-MailboxExportRequest.

To see all of the completed mailbox export requests run this command.

[PS] C:\>Get-MailboxExportRequest | where {$_.status -eq "Completed"}

Name                                           Mailbox                                        Status
----                                           -------                                        ------
MailboxExport                                  exchangeserverpro.net/Company/User             Completed

And to clear all completed mailbox export requests from Exchange run the following command.

[PS] C:\>Get-MailboxExportRequest | where {$_.status -eq "Completed"} | Remove-MailboxExportRequest

To import to the new mailbox:

New-MailboxImportRequest –Mailbox dstmailbox –FilePath \\esp-ho-ex2010a\pst\alan.reid.pst

To see the whether the Import has been completed you need to run the following command

Get-MailboxImportRequest

If you want to Import the PST file into a specified folder under the mailbox then we can use the following command with a –TargetRootFolder parameter which will create a specific folder and import all the data into it.

New-MailboxImportRequest –Mailbox dstmailbox –FilePath “\\esp-ho-ex2010a\pst\alan.reid.pst” -TargetRootFolder “RecoveredFiles”

 

Apr 24 15

Add services to plesk watchdog

by admin

How to add services to plesk watchdog? Plesk use monit to monitor services so that syntax should be almost fine. But first:

1)to include a custom program we need to define the program as a services in the server

2)need to add the services to Plesk/PSA watchdog program. We need to a small hack into the psa database.We need to add a row into the psa.module_watchdog_service table:

$ mysql -u admin -p //log into the mysql

mysql>use psa;
mysql>INSERT INTO psa.module_watchdog_service (id,name,label,sort_val,mon_status,save_stats,timeout,timeout_restart_num,timeout_cycles_num,connection_timeout,start_cmd,stop_cmd,start_time) VALUES (18,’my-program’,’My Program’,140,’notmonitored’,’on’,’on’,5,5,5,’/etc/rc.d/init.d/my-program start’,’/etc/rc.d/init.d/my-program stop’, 300);
mysql>quit // to exit mysql

3)Then go to the watchdog service template directory. Never mess-up with other files, as after plesk restarts it will override all configuration. The below path depends where your psa/plesk is installed.

$ cd /usr/local/psa/etc/modules/watchdog/service.tpl.d

4)create a file named my-program and add the following to the program:

check process my-program
with pidfile /usr/local/programpath/my-program.pid
start = “/etc/rc.d/init.d/my-program start”
stop = “/etc/rc.d/init.d/my-program stop”
if failed host 127.0.0.1 port 8080 protocol HTTP timeout 120 seconds then alert
if failed host 127.0.0.1 port 8080 protocol HTTP timeout 300 seconds then restart
if 5 restarts within 5 cycles then timeout
every 1 cycles
if cpu usage > 95% for 10 cycles then restart
mode active

5)Go to the plesk control panel and restart plesk watchdog program. My Program will be visible in the list.

 

Apr 8 15

Repair qmail queue

by admin

If you delete email files from qmail queue, or somehow qmail queue got corrupted you can fix it with bellow commands.

/etc/init.d/qmail stop
cd /var/qmail/queue
rm -rf info intd local mess remote todo
mkdir mess
for i in `seq 0 22`; do
mkdir mess/$i
done
cp -r mess info
cp -r mess intd
cp -r mess local
cp -r mess remote
cp -r mess todo
chmod -R 750 mess todo
chown -R qmailq:qmail mess todo
chmod -R 700 info intd local remote
chown -R qmailq:qmail intd
chown -R qmails:qmail info local remote
/etc/init.d/qmail start

Feb 27 15

Debian. find broken packages and reinstall them

by admin

I often use debsums when I take over the maintenance of a Debian server because I want to verify which files have been modified by the former administrator.

Without any argument, debsums is very verbose, it will list every installed file (except configuration files) and tells whether it’s unmodified (“OK”) or not (“FAILED”).

$ sudo debsums
/usr/bin/a2ps                                               OK
[...]

With the --all option, it will verify all files including configuration files. With --config it will verify only the configuration files.

With the --changed option, debsums will only list modified files among those inspected. The following invocation will thus list all files which have been modified on the system and which are not configuration files.

$ sudo debsums --changed
/usr/lib/perl5/AptPkg/Config.pm
/usr/lib/perl5/AptPkg.pm
[...]


Find out the package affected and reinstall it

debsums told me that /usr/lib/perl5/AptPkg.pm was modified. Indeed I remember having manually installed a modified version of that perl module for a quick test.

I find out the affected package with dpkg --search /usr/lib/perl5/AptPkg.pm: it’s libapt-pkg-perl.

Now I just have to reinstall this package to overwrite the modified files with the original ones:

$ sudo aptitude reinstall libapt-pkg-perl
[...]
# Or with apt-get
$ sudo apt-get --reinstall install libapt-pkg-perl
[...]

You might have to repeat the process until debsums no longer reports any modified file.

Feb 18 15

Which ports are considered unsafe in browsers?

by admin

Some ports are considered unsafe in browsers and they will block any packet to these ports.

you will receive unsafe port error or “This address uses a network port which is normally used for purposes other than Web browsing. Firefox has canceled the request for your protection.” varies by browser…

You have to be careful when starting a (web) application on any of that ports.

The list of unsafe ports is:

1)Chrome:

  1,    // tcpmux
  7,    // echo
  9,    // discard
  11,   // systat
  13,   // daytime
  15,   // netstat
  17,   // qotd
  19,   // chargen
  20,   // ftp data
  21,   // ftp access
  22,   // ssh
  23,   // telnet
  25,   // smtp
  37,   // time
  42,   // name
  43,   // nicname
  53,   // domain
  77,   // priv-rjs
  79,   // finger
  87,   // ttylink
  95,   // supdup
  101,  // hostriame
  102,  // iso-tsap
  103,  // gppitnp
  104,  // acr-nema
  109,  // pop2
  110,  // pop3
  111,  // sunrpc
  113,  // auth
  115,  // sftp
  117,  // uucp-path
  119,  // nntp
  123,  // NTP
  135,  // loc-srv /epmap
  139,  // netbios
  143,  // imap2
  179,  // BGP
  389,  // ldap
  465,  // smtp+ssl
  512,  // print / exec
  513,  // login
  514,  // shell
  515,  // printer
  526,  // tempo
  530,  // courier
  531,  // chat
  532,  // netnews
  540,  // uucp
  556,  // remotefs
  563,  // nntp+ssl
  587,  // stmp?
  601,  // ??
  636,  // ldap+ssl
  993,  // ldap+ssl
  995,  // pop3+ssl
  2049, // nfs
  3659, // apple-sasl / PasswordServer
  4045, // lockd
  6000, // X11
  6665, // Alternate IRC [Apple addition]
  6666, // Alternate IRC [Apple addition]
  6667, // Standard IRC [Apple addition]
  6668, // Alternate IRC [Apple addition]
  6669, // Alternate IRC [Apple addition]

Firefox:
1 tcpmux
7 echo
9 discard
11 systat
13 daytime
15 netstat
17 qotd
19 chargen
20 ftp data
21 ftp control
22 ssh
23 telnet
25 smtp
37 time
42 name
43 nicname
53 domain
77 priv-rjs
79 finger
87 ttylink
95 supdup
101 hostriame
102 iso-tsap
103 gppitnp
104 acr-nema
109 POP2
110 POP3
111 sunrpc
113 auth
115 sftp
117 uucp-path
119 NNTP
123 NTP
135 loc-srv / epmap
139 netbios
143 IMAP2
179 BGP
389 LDAP
465 SMTP+SSL
512 print / exec
513 login
514 shell
515 printer
526 tempo
530 courier
531 chat
532 netnews
540 uucp
556 remotefs
563 NNTP+SSL
587 submission
601 syslog
636 LDAP+SSL
993 IMAP+SSL
995 POP3+SSL
2049 nfs
4045 lockd
6000 X11
Feb 13 15

Windows server vm on KVM host settings/tweaks

by admin

1. set elevator=deadline in grub kernel options.

or at runtime:

setting “deadline” as the I/O scheduler for your host’s disks before starting KVM:

 for f in /sys/block/sd*/queue/scheduler; do echo "deadline" > $f; done

and 

cat /sys/block/sd*/queue/scheduler 
to view current scheduler

2.use raw LVs whenever possible. Qcow2 gives overhead. Files on a FS also have overhead, virtio drivers cache none.

3.make sure the virtio drivers are up to date, especially the windows ones.

4. use e1000 network drivers foe vm in place of default r8169 (which can hang)

5…to be continued…

 

Jan 30 15

Understanding a Kernel Oops!

by admin
Understanding a kernel panic and doing the forensics to trace the bug is considered a hacker’s job. This is a complex task that requires sound knowledge of both the architecture you are working on, and the internals of the Linux kernel. Depending on type of error detected by the kernel, panics in the Linux kernel are classified as hard panics (Aiee!) and soft panics (Oops!). This article explains the workings of a Linux kernel ‘Oops’, helps to create a simple version, and then debug it. It is mainly intended for beginners getting into Linux kernel development, who need to debug the kernel. Knowledge of the Linux kernel, and C programming, is assumed.

An “Oops” is what the kernel throws at us when it finds something faulty, or an exception, in the kernel code. It’s somewhat like the segfaults of user-space. An Oops dumps its message on the console; it contains the processor status and the CPU registers of when the fault occurred. The offending process that triggered this Oops gets killed without releasing locks or cleaning up structures. The system may not even resume its normal operations sometimes; this is called an unstable state. Once an Oops has occurred, the system cannot be trusted any further.

Let’s try to generate an Oops message with sample code, and try to understand the dump.

Setting up the machine to capture an Oops

The running kernel should be compiled with CONFIG_DEBUG_INFO, and syslogd should be running. To generate and understand an Oops message, Let’s write a  sample kernel module, oops.c:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
static void create_oops() {
        *(int *)0 = 0;
}
static int __init my_oops_init(void) {
        printk("oops from the module\n");
        create_oops();
       return (0);
}
static void __exit my_oops_exit(void) {
        printk("Goodbye world\n");
}
module_init(my_oops_init);
module_exit(my_oops_exit);

The associated Makefile for this module is as follows:

obj-m   := oops.o
KDIR    := /lib/modules/$(shell uname -r)/build
PWD     := $(shell pwd)
SYM=$(PWD)
all:
        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules

Once executed, the module generates the following Oops:

BUG: unable to handle kernel NULL pointer dereference at (null)
IP: [<ffffffffa03e1012>] my_oops_init+0x12/0x21 [oops]
PGD 7a719067 PUD 7b2b3067 PMD 0
Oops: 0002 [#1] SMP
last sysfs file: /sys/devices/virtual/misc/kvm/uevent
CPU 1
Pid: 2248, comm: insmod Tainted: P           2.6.33.3-85.fc13.x86_64
RIP: 0010:[<ffffffffa03e1012>]  [<ffffffffa03e1012>] my_oops_init+0x12/0x21 [oops]
RSP: 0018:ffff88007ad4bf08  EFLAGS: 00010292
RAX: 0000000000000018 RBX: ffffffffa03e1000 RCX: 00000000000013b7
RDX: 0000000000000000 RSI: 0000000000000046 RDI: 0000000000000246
RBP: ffff88007ad4bf08 R08: ffff88007af1cba0 R09: 0000000000000004
R10: 0000000000000000 R11: ffff88007ad4bd68 R12: 0000000000000000
R13: 00000000016b0030 R14: 0000000000019db9 R15: 00000000016b0010
FS:  00007fb79dadf700(0000) GS:ffff880001e80000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000000 CR3: 000000007a0f1000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process insmod (pid: 2248, threadinfo ffff88007ad4a000, task ffff88007a222ea0)
Stack:
ffff88007ad4bf38 ffffffff8100205f ffffffffa03de060 ffffffffa03de060
 0000000000000000 00000000016b0030 ffff88007ad4bf78 ffffffff8107aac9
 ffff88007ad4bf78 00007fff69f3e814 0000000000019db9 0000000000020000
Call Trace:
[<ffffffff8100205f>] do_one_initcall+0x59/0x154
[<ffffffff8107aac9>] sys_init_module+0xd1/0x230
[<ffffffff81009b02>] system_call_fastpath+0x16/0x1b
Code: <c7> 04 25 00 00 00 00 00 00 00 00 31 c0 c9 c3 00 00 00 00 00 00 00
RIP  [<ffffffffa03e1012>] my_oops_init+0x12/0x21 [oops]
RSP <ffff88007ad4bf08>
CR2: 0000000000000000

Understanding the Oops dump

Let’s have a closer look at the above dump, to understand some of the important bits of information.

BUG: unable to handle kernel NULL pointer dereference at (null)

The first line indicates a pointer with a NULL value.

IP: [<ffffffffa03e1012>] my_oops_init+0x12/0x21 [oops]

IP is the instruction pointer.

Oops: 0002 [#1] SMP

This is the error code value in hex. Each bit has a significance of its own:

  • bit 0 == 0 means no page found, 1 means a protection fault
  • bit 1 == 0 means read, 1 means write
  • bit 2 == 0 means kernel, 1 means user-mode
  • [#1] — this value is the number of times the Oops occurred. Multiple Oops can be triggered as a cascading effect of the first one.
CPU 1

This denotes on which CPU the error occurred.

Pid: 2248, comm: insmod Tainted: P           2.6.33.3-85.fc13.x86_64

The Tainted flag points to P here. Each flag has its own meaning. A few other flags, and their meanings, picked up from kernel/panic.c:

  • P — Proprietary module has been loaded.
  • F — Module has been forcibly loaded.
  • S — SMP with a CPU not designed for SMP.
  • R — User forced a module unload.
  • M — System experienced a machine check exception.
  • B — System has hit bad_page.
  • U — Userspace-defined naughtiness.
  • A — ACPI table overridden.
  • W — Taint on warning.
RIP: 0010:[<ffffffffa03e1012>]  [<ffffffffa03e1012>] my_oops_init+0x12/0x21 [oops]

RIP is the CPU register containing the address of the instruction that is getting executed. 0010comes from the code segment register. my_oops_init+0x12/0x21 is the <symbol> + the offset/length.

RSP: 0018:ffff88007ad4bf08  EFLAGS: 00010292
RAX: 0000000000000018 RBX: ffffffffa03e1000 RCX: 00000000000013b7
RDX: 0000000000000000 RSI: 0000000000000046 RDI: 0000000000000246
RBP: ffff88007ad4bf08 R08: ffff88007af1cba0 R09: 0000000000000004
R10: 0000000000000000 R11: ffff88007ad4bd68 R12: 0000000000000000
R13: 00000000016b0030 R14: 0000000000019db9 R15: 00000000016b0010

This is a dump of the contents of some of the CPU registers.

Stack:
ffff88007ad4bf38 ffffffff8100205f ffffffffa03de060 ffffffffa03de060
 0000000000000000 00000000016b0030 ffff88007ad4bf78 ffffffff8107aac9
 ffff88007ad4bf78 00007fff69f3e814 0000000000019db9 0000000000020000

The above is the stack trace.

Call Trace:
[<ffffffff8100205f>] do_one_initcall+0x59/0x154
[<ffffffff8107aac9>] sys_init_module+0xd1/0x230
[<ffffffff81009b02>] system_call_fastpath+0x16/0x1b

The above is the call trace — the list of functions being called just before the Oops occurred.

Code: <c7> 04 25 00 00 00 00 00 00 00 00 31 c0 c9 c3 00 00 00 00 00 00 00

The Code is a hex-dump of the section of machine code that was being run at the time the Oops occurred.

Debugging an Oops dump

The first step is to load the offending module into the GDB debugger, as follows:

[[email protected] oops]# gdb oops.ko
GNU gdb (GDB) Fedora (7.1-18.fc13)
Reading symbols from /code/oops/oops.ko...done.
(gdb) add-symbol-file oops.o 0xffffffffa03e1000
add symbol table from file "oops.o" at
    .text_addr = 0xffffffffa03e1000

Next, add the symbol file to the debugger. The add-symbol-file command’s first argument isoops.o and the second argument is the address of the text section of the module. You can obtain this address from /sys/module/oops/sections/.init.text (where oops is the module name):

(gdb) add-symbol-file oops.o 0xffffffffa03e1000
add symbol table from file "oops.o" at
    .text_addr = 0xffffffffa03e1000
(y or n) y
Reading symbols from /code/oops/oops.o...done.

From the RIP instruction line, we can get the name of the offending function, and disassemble it.

(gdb) disassemble my_oops_init
Dump of assembler code for function my_oops_init:
   0x0000000000000038 <+0>:    push   %rbp
   0x0000000000000039 <+1>:    mov    $0x0,%rdi
   0x0000000000000040 <+8>:    xor    %eax,%eax
   0x0000000000000042 <+10>:    mov    %rsp,%rbp
   0x0000000000000045 <+13>:    callq  0x4a <my_oops_init+18>
   0x000000000000004a <+18>:    movl   $0x0,0x0
   0x0000000000000055 <+29>:    xor    %eax,%eax
   0x0000000000000057 <+31>:    leaveq
   0x0000000000000058 <+32>:    retq
End of assembler dump.

Now, to pin point the actual line of offending code, we add the starting address and the offset. The offset is available in the same RIP instruction line. In our case, we are adding0x0000000000000038 + 0x012 =  0x000000000000004a. This points to the movl instruction.

(gdb) list *0x000000000000004a
0x4a is in my_oops_init (/code/oops/oops.c:6).
1    #include <linux/kernel.h>
2    #include <linux/module.h>
3    #include <linux/init.h>
4    
5    static void create_oops() {
6        *(int *)0 = 0;
7    }

This gives the code of the offending function.

References

The kerneloops.org website can be used to pick up a lot of Oops messages to debug. The Linux kernel documentation directory has information about Oops — kernel/Documentation/oops-tracing.txt. This, and numerous other online resources, were used while creating this article.

Jan 20 15

Intel e1000, e1000e eth0 resetting/hang workarounds

by admin

I got several interface resets when traffic is high (>500Mbps) or large number of packets sent through it.

You can see errors like bellow in logs and interface will be down for a couple of seconds

#######################################################

Jan 20 13:02:56 R2 kernel: [65563.040441] e1000e 0000:0c:00.0: eth0: Detected Hardware Unit Hang:

Jan 20 13:02:56 R2 kernel: [65563.040442] TDH <16>
Jan 20 13:02:56 R2 kernel: [65563.040443] TDT <7a>
Jan 20 13:02:56 R2 kernel: [65563.040444] next_to_use <7a>
Jan 20 13:02:56 R2 kernel: [65563.040444] next_to_clean <15>
Jan 20 13:02:56 R2 kernel: [65563.040445] buffer_info[next_to_clean]:
Jan 20 13:02:56 R2 kernel: [65563.040445] time_stamp <100639422>
Jan 20 13:02:56 R2 kernel: [65563.040446] next_to_watch <19>
Jan 20 13:02:56 R2 kernel: [65563.040447] jiffies <100639560>
Jan 20 13:02:56 R2 kernel: [65563.040447] next_to_watch.status <0>
Jan 20 13:02:56 R2 kernel: [65563.040448] MAC Status <80383>
Jan 20 13:02:56 R2 kernel: [65563.040449] PHY Status <792d>
Jan 20 13:02:56 R2 kernel: [65563.040449] PHY 1000BASE-T Status <3c00>
Jan 20 13:02:56 R2 kernel: [65563.040450] PHY Extended Status <3000>
Jan 20 13:02:56 R2 kernel: [65563.040450] PCI Status <10>
Jan 20 13:03:00 R2 kernel: [65567.040385] e1000e 0000:0c:00.0: eth0: Detected Hardware Unit Hang:
Jan 20 13:03:00 R2 kernel: [65567.040386] TDH <16>
Jan 20 13:03:00 R2 kernel: [65567.040387] TDT <7a>
Jan 20 13:03:00 R2 kernel: [65567.040387] next_to_use <7a>
Jan 20 13:03:00 R2 kernel: [65567.040388] next_to_clean <15>
Jan 20 13:03:00 R2 kernel: [65567.040388] buffer_info[next_to_clean]:
Jan 20 13:03:00 R2 kernel: [65567.040389] time_stamp <100639422>
Jan 20 13:03:00 R2 kernel: [65567.040390] next_to_watch <19>
Jan 20 13:03:00 R2 kernel: [65567.040390] jiffies <1006396f0>
Jan 20 13:03:00 R2 kernel: [65567.040391] next_to_watch.status <0>
Jan 20 13:03:00 R2 kernel: [65567.040391] MAC Status <80383>
Jan 20 13:03:00 R2 kernel: [65567.040392] PHY Status <792d>
Jan 20 13:03:00 R2 kernel: [65567.040392] PHY 1000BASE-T Status <3c00>
Jan 20 13:03:00 R2 kernel: [65567.040393] PHY Extended Status <3000>
Jan 20 13:03:00 R2 kernel: [65567.040394] PCI Status <10>
Jan 20 13:03:00 R2 kernel: [65567.779227] ————[ cut here ]————
Jan 20 13:03:00 R2 kernel: [65567.779235] WARNING: at net/sched/sch_generic.c:257 dev_watchdog+0xf3/0x191()
Jan 20 13:03:00 R2 kernel: [65567.779248] Modules linked in: 8021q garp stp llc iptable_nat ip6table_filter ip6table_raw ip6_tables iptable_filter xt_NOTRACK xt_CT nfnetlink_cthelper nfnetlink iptable_raw nf_nat_pptp nf_conntrack_pptp nf_conntrack_proto_gre nf_nat_h323 nf_conntrack_h323 nf_nat_sip nf_conntrack_sip nf_nat_proto_gre nf_nat_tftp nf_nat_ftp nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack_tftp nf_conntrack_ftp nf_conntrack mperf cpufreq_userspace cpufreq_stats cpufreq_powersave cpufreq_ondemand freq_table cpufreq_conservative ipv6 evdev dcdbas psmouse serio_raw i5k_amb pcspkr i5000_edac rng_core edac_core processor shpchp button pci_hotplug thermal_sys battery usb_storage ohci_hcd squashfs loop ext4 jbd2 crc16 raid10 raid456 async_raid6_recov async_pq raid6_pq async_xor xor async_memcpy async_tx raid1 raid0 multipath linear md_mod usbhid hid ses enclosure pata_acpi ata_generic ata_piix megaraid_sas e1000e tg3 bnx2 [last unloaded: scsi_wait_scan]
Jan 20 13:03:00 R2 kernel: [65567.779459] Pid: 11, comm: kworker/0:1 Not tainted 3.3.8-1-amd64-vyatta #1
Jan 20 13:03:00 R2 kernel: [65567.779463] Call Trace:
Jan 20 13:03:00 R2 kernel: [65567.779467] <IRQ> [<ffffffff8103b3c2>] ? warn_slowpath_common+0x78/0x8c
Jan 20 13:03:00 R2 kernel: [65567.779481] [<ffffffff8103b474>] ? warn_slowpath_fmt+0x45/0x4a
Jan 20 13:03:00 R2 kernel: [65567.779490] [<ffffffff8137dffd>] ? _raw_spin_lock+0x5/0x8
Jan 20 13:03:00 R2 kernel: [65567.779496] [<ffffffff812fe963>] ? netif_tx_lock+0x67/0x7c
Jan 20 13:03:00 R2 kernel: [65567.779503] [<ffffffff812fea6b>] ? dev_watchdog+0xf3/0x191
Jan 20 13:03:00 R2 kernel: [65567.779510] [<ffffffff81047628>] ? run_timer_softirq+0x1a4/0x278
Jan 20 13:03:00 R2 kernel: [65567.779517] [<ffffffff812fe978>] ? netif_tx_lock+0x7c/0x7c
Jan 20 13:03:00 R2 kernel: [65567.779523] [<ffffffff81040a24>] ? __do_softirq+0xc4/0x1a0
Jan 20 13:03:00 R2 kernel: [65567.779530] [<ffffffff8107414b>] ? clockevents_program_event+0x99/0xb8
Jan 20 13:03:00 R2 kernel: [65567.779537] [<ffffffff8105869e>] ? hrtimer_interrupt+0x10e/0x19f
Jan 20 13:03:00 R2 kernel: [65567.779544] [<ffffffff8138001c>] ? call_softirq+0x1c/0x30
Jan 20 13:03:00 R2 kernel: [65567.779551] [<ffffffff8101102b>] ? do_softirq+0x3f/0x79
Jan 20 13:03:00 R2 kernel: [65567.779557] [<ffffffff810407f9>] ? irq_exit+0x44/0xb1
Jan 20 13:03:00 R2 kernel: [65567.779564] [<ffffffff81027b3f>] ? smp_apic_timer_interrupt+0x85/0x93
Jan 20 13:03:00 R2 kernel: [65567.779570] [<ffffffff8137f61e>] ? apic_timer_interrupt+0x6e/0x80
Jan 20 13:03:00 R2 kernel: [65567.779574] <EOI> [<ffffffff8137e01e>] ? _raw_spin_lock_irqsave+0x1e/0x26
Jan 20 13:03:00 R2 kernel: [65567.779584] [<ffffffff8103b51d>] ? __call_console_drivers+0x10/0x86
Jan 20 13:03:00 R2 kernel: [65567.779590] [<ffffffff8103c27a>] ? vprintk+0x355/0x37e
Jan 20 13:03:00 R2 kernel: [65567.779596] [<ffffffff8137c588>] ? printk+0x40/0x48
Jan 20 13:03:00 R2 kernel: [65567.779603] [<ffffffff81254147>] ? dev_printk+0x42/0x47
Jan 20 13:03:00 R2 kernel: [65567.779607] [<ffffffff812e5577>] ? netdev_err+0x51/0x56
Jan 20 13:03:00 R2 kernel: [65567.779618] [<ffffffffa0062f25>] ? e1000_print_hw_hang+0x1a5/0x1b4 [e1000e]
Jan 20 13:03:00 R2 kernel: [65567.779626] [<ffffffff81061fec>] ? finish_task_switch+0x4f/0xc8
Jan 20 13:03:00 R2 kernel: [65567.779636] [<ffffffffa0062d80>] ? e1000_maybe_stop_tx+0x8b/0x8b [e1000e]
Jan 20 13:03:00 R2 kernel: [65567.779643] [<ffffffff810514d9>] ? process_one_work+0x1c2/0x2d8
Jan 20 13:03:00 R2 kernel: [65567.779649] [<ffffffff81051721>] ? worker_thread+0x132/0x250
Jan 20 13:03:00 R2 kernel: [65567.779655] [<ffffffff810515ef>] ? process_one_work+0x2d8/0x2d8
Jan 20 13:03:00 R2 kernel: [65567.779661] [<ffffffff810515ef>] ? process_one_work+0x2d8/0x2d8
Jan 20 13:03:00 R2 kernel: [65567.779667] [<ffffffff81054db1>] ? kthread+0x81/0x89
Jan 20 13:03:00 R2 kernel: [65567.779673] [<ffffffff8137ff24>] ? kernel_thread_helper+0x4/0x10
Jan 20 13:03:00 R2 kernel: [65567.779680] [<ffffffff81054d30>] ? kthread_freezable_should_stop+0x4e/0x4e
Jan 20 13:03:00 R2 kernel: [65567.779686] [<ffffffff8137ff20>] ? gs_change+0x13/0x13
Jan 20 13:03:00 R2 kernel: [65567.779690] —[ end trace 74029b34e2d5927c ]—
Jan 20 13:03:00 R2 kernel: [65567.780833] e1000e 0000:0c:00.0: eth0: Reset adapter

##########################################################

One of the workarounds would be to disable TSO (GSO and GRO eventually) on interface, even if we will have some resource degradation.

If you want to see curent eth0 offload settings(TSO=tcp-segmentation-offload):

#ethtool -k eth0
Offload parameters for eth0:
rx-checksumming: on
tx-checksumming: on
scatter-gather: on
tcp-segmentation-offload: on
udp-fragmentation-offload: off
generic-segmentation-offload: on
generic-receive-offload: on
large-receive-offload: off
ntuple-filters: off
receive-hashing: off

To set TSO off :

#ethtool -K tso off

 

 

Jul 9 14

How to change the default umask for Apache/Php

by admin

Apache/Php umask determines the permissions for the newly created files. On a VPS / Dedicated server you can change the umask to suit your specific needs by editing:

/usr/local/apache/bin/envvars

To make this change persistent create a file called umask with the digits 022 as contents in /var/cpanel/easy/apache/rawenv/

There you should add:

umask 022

Right after that restart Apache and Apache/Php’s default umask will become 22.

If not working you could check /etc/login.defs and change/uncomment umask to 022 and/or append umask 022 to /etc/sysconfig/httpd .