I've used TortoiseHG to export a patch that moves a file to another place. This is the content of the patch :
# HG changeset patch
# User Arthur Attout <arthur.attout#outlook.com>
# Date 1551095974 -3600
# Mon Feb 25 12:59:34 2019 +0100
# Branch CBLS
# Node ID f73e7c88dbcf6de3091e1edc9360336d1c699038
# Parent 863386a2a66de9cdd6d8885912988cb4b862eef0
Unit tests + migrate unit tests int -> long
diff -r 863386a2a66d -r f73e7c88dbcf oscar-cbls/src/test/scala/oscar/cbls/test/invariants/InvariantTests.scala
--- a/oscar-cbls/src/test/scala/oscar/cbls/test/invariants/InvariantTests.scala Fri Feb 22 14:30:14 2019 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
## -1,948 +0,0 ##
-package oscar.cbls.test.invariants
-
- Thousands of lines ...
-
diff -r 863386a2a66d -r f73e7c88dbcf oscar-cbls/src/test/scala/oscar/cbls/test/unit/InvariantTests.scala
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/oscar-cbls/src/test/scala/oscar/cbls/test/unit/InvariantTests.scala Mon Feb 25 12:59:34 2019 +0100
## -0,0 +1,877 ##
+package oscar.cbls.test.unit
+ Same thousands of lines ...
+
This is the only thing the patches do. It moves the file InvariantTests from invariants to unit.
When I import the patch in tortoiseHG it gives the following error
Hunk #1 FAILED at 0
1 out of 1 hunks FAILED -- saving rejects to file oscar-cbls/src/test/scala/oscar/cbls/test/invariants/InvariantTests.scala.rej
patching file oscar-cbls/src/test/scala/oscar/cbls/test/unit/InvariantTests.scala
adding oscar-cbls/src/test/scala/oscar/cbls/test/unit/InvariantTests.scala
abandonĀ : patch failed to apply
[command returned code 255 Mon Apr 15 19:55:02 2019]
After that, this is the content of my working directory
The file is not moved.
What does this 255 error mean ? Why isn't the patch simply applying an moving the file properly ?
Mercurial doc clearly states:
Mercurial's default format for showing changes between two versions of
a file is compatible with the unified format of GNU diff, which can be
used by GNU patch and many other standard tools.
While this standard format is often enough, it does not encode the following information:
executable status and other permission bits
copy or rename information
changes in binary files creation or deletion of empty files
In order to have this data in patch, you have to create git-compatible patch with -git (AFAICR) option, also available in THG GUI
Related
When I run commands in the Windows CMD terminal I see a lot of tracing information.
I have not specifically done anything to enable it.
After some commands (not all) - for example, dotnet. I get this message
Tracing enabled # Tue Mar 30 16:34:45 2021 GMT
--- Invoked dotnet [version: 5.0.4, commit hash: f27d33729518f5aa478aa818b7b4f54a4d50bef1] main = {
C:\Program Files\dotnet\dotnet.exe
}
for PowerShell I see similar
Tracing enabled # Tue Mar 30 15:29:02 2021 GMT
--- Invoked apphost [version: 5.0.4, commit hash: f27d33729518f5aa478aa818b7b4f54a4d50bef1] main = {
C:\Program Files\PowerShell\7\pwsh.exe
-WorkingDirectory
~
}
the question is how to disable this.
The solution is to change environment variable
COREHOST_TRACE=0
Not sure how it was changed on my computer :(.
I am trying to run an Rscript in crontab on OS X (10.11.5) and I have not been able to get it to execute. The script permission are working and the path is working. I have blacked out some of the file path
here is the crontab job, the script name is h2oDeepLearnCRON.R
20 5 * * 0-4 /bin/bash /Users/#########/#######/FinancialMarketModeling/h2oDeepLearnCRON.R >> testrun.txt
I get the following mail message outlining the error
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=#######>
X-Cron-Env: <USER=#######>
X-Cron-Env: <HOME=/Users/#######>
Date: Wed, 1 Feb 2017 05:20:01 -0500 (EST)
/Users/#######/########/FinancialMarketModeling/h2oDeepLearnCRON.R: line 7: syntax error near unexpected token `quantmod'
/Users/#########/#######/FinancialMarketModeling/h2oDeepLearnCRON.R: line 7: `require(quantmod)'
the program starts to execute but generates an error when it encounters the first line of code which is loading the packages
require(quantmod)
I have done some searching on the shell not recognizing the the "(" and recommended the script have a
#!/bin/bash
inserted, but that did not work nothing happened
Any suggestions would be helpful
Is this the revised suggestion?
20 5 * * 0-4 Rscript.R /Users/#########/#######/FinancialMarketModeling/h2oDeepLearnCRON.R
I have a simple 4 server setup running jMeter (3 slaves, 1 master):
Slave 1: 10.135.62.18 running ./jmeter-server -Djava.rmi.server.hostname=10.135.62.18
Slave 2: 10.135.62.22 running ./jmeter-server -Djava.rmi.server.hostname=10.135.62.22
Slave 3: 10.135.62.20 running ./jmeter-server -Djava.rmi.server.hostname=10.135.62.20
Master: 10.135.62.11 with remote_hosts=10.135.62.18,10.135.62.22,10.135.62.20
I start the test with ./jmeter -n -t /root/jmeter/simple.jmx -l /root/jmeter/result.jtl -r
With the following output:
Writing log file to: /root/apache-jmeter-3.0/bin/jmeter.log
Creating summariser <summary>
Created the tree successfully using /root/jmeter/simple.jmx
Configuring remote engine: 10.135.62.18
Configuring remote engine: 10.135.62.22
Configuring remote engine: 10.135.62.20
Starting remote engines
Starting the test # Mon Aug 29 11:22:38 UTC 2016 (1472469758410)
Remote engines have been started
Waiting for possible Shutdown/StopTestNow/Heapdump message on port 4445
The Slaves print:
Starting the test on host 10.135.62.22 # Mon Aug 29 11:22:39 UTC 2016 (1472469759257)
Finished the test on host 10.135.62.22 # Mon Aug 29 11:22:54 UTC 2016 (1472469774871)
Starting the test on host 10.135.62.18 # Mon Aug 29 11:22:39 UTC 2016 (1472469759519)
Finished the test on host 10.135.62.18 # Mon Aug 29 11:22:57 UTC 2016 (1472469777173)
Starting the test on host 10.135.62.20 # Mon Aug 29 11:22:39 UTC 2016 (1472469759775)
Finished the test on host 10.135.62.20 # Mon Aug 29 11:22:56 UTC 2016 (1472469776670)
Unfortunately the master waits for messages on port 4445 indefinitely event though all slaves finished the test.
Is there anything I have missed?
I figured it out myself just before submitting the question. I guess the solution could be useful nonetheless:
Once I start the test (on the main server) with this:
./jmeter -n -t /root/jmeter/simple.jmx -l /root/jmeter/result.jtl -r -Djava.rmi.server.hostname=10.135.62.11 -Dclient.rmi.localport=4001
It works just fine. I wonder why the documentation doesn't mention something like this.
I want all the records till the end of the log file which are greater than given date...
suppose given date is Mon Dec 14 22:00:03 2015 then i want all the lines in the log file till end when first occurrence of greater than this date is found.
ex: awk ' { if ( $0 > "Tue Dec 15 08:00:00 2015") print } ' file.out
only prints lines greater than date but i want all lines after match till end of file..
please note that
1. i can not use regex since i dont know if entry is present in the log file for that date i.e H:M:S so i have to use greater than date functionality.
Date is not present on every line of the lg file. it is present in between but on new line
please help
sample log file:::
Mon Dec 14 02:00:00 2015
Clearing Resource Manager plan via parameter
Mon Dec 14 07:02:57 2015
***********************************************************************
Fatal NI connect error 12504, connecting to:
(DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=)(CID=(PROGRAM=oracle)(HOST=ltest8)(USER=oracle)))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.115)(PORT=1521)))
VERSION INFORMATION:
TNS for Linux: Version 11.1.0.6.0 - Production
TCP/IP NT Protocol Adapter for Linux: Version 11.1.0.6.0 - Production
Time: 14-DEC-2015 07:02:57
Tracing not turned on.
Tns error struct:
ns main err code: 12564
TNS-12564: TNS:connection refused
ns secondary err code: 0
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0
Mon Dec 14 08:01:37 2015
***********************************************************************
Fatal NI connect error 12504, connecting to:
(DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=)(CID=(PROGRAM=oracle)(HOST=ltest8)(USER=oracle)))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.115)(PORT=1521)))
VERSION INFORMATION:
TNS for Linux: Version 11.1.0.6.0 - Production
TCP/IP NT Protocol Adapter for Linux: Version 11.1.0.6.0 - Production
Time: 14-DEC-2015 08:01:37
Tracing not turned on.
Tns error struct:
ns main err code: 12564
TNS-12564: TNS:connection refused
ns secondary err code: 0
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0
Mon Dec 14 08:54:33 2015
***********************************************************************
Fatal NI connect error 12504, connecting to:
(DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=)(CID=(PROGRAM=oracle)(HOST=ltest8)(USER=oracle)))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.115)(PORT=1521)))
VERSION INFORMATION:
TNS for Linux: Version 11.1.0.6.0 - Production
TCP/IP NT Protocol Adapter for Linux: Version 11.1.0.6.0 - Production
Time: 14-DEC-2015 08:54:33
Tracing not turned on.
Tns error struct:
ns main err code: 12564
TNS-12564: TNS:connection refused
ns secondary err code: 0
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0
Mon Dec 14 08:57:18 2015
Thread 1 advanced to log sequence 232
Current log# 2 seq# 232 mem# 0: /u04/app/oracle/oradata/kcom/redo02.log
Mon Dec 14 08:57:19 2015
Errors in file /u01/app/oracle/diag/rdbms/kcom/Rialto/trace/Rialto_arc3_3953.trc:
ORA-19815: WARNING: db_recovery_file_dest_size of 268435456 bytes is 100.00% used, and has 0 remaining bytes available.
************************************************************************
You have following choices to free up space from flash recovery area:
1. Consider changing RMAN RETENTION POLICY. If you are using Data Guard,
then consider changing RMAN ARCHIVELOG DELETION POLICY.
2. Back up files to tertiary device such as tape using RMAN
BACKUP RECOVERY AREA command.
3. Add disk space and increase db_recovery_file_dest_size parameter to
reflect the new space.
4. Delete unnecessary files using RMAN DELETE command. If an operating
system command was used to delete files, then use RMAN CROSSCHECK and
DELETE EXPIRED commands.
************************************************************************
Mon Dec 14 09:17:45 2015
***********************************************************************
Fatal NI connect error 12504, connecting to:
(DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=)(CID=(PROGRAM=oracle)(HOST=ltest8)(USER=oracle)))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.115)(PORT=1521)))
VERSION INFORMATION:
TNS for Linux: Version 11.1.0.6.0 - Production
TCP/IP NT Protocol Adapter for Linux: Version 11.1.0.6.0 - Production
Time: 14-DEC-2015 09:17:45
Tracing not turned on.
Tns error struct:
ns main err code: 12564
TNS-12564: TNS:connection refused
ns secondary err code: 0
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0
Mon Dec 14 10:25:24 2015
QKSRC: ViewText[ecode=942] = SELECT /*+ result_cache */ ID, 'PLUGIN_'||NAME AS NAME, STANDARD_ATTRIBUTES, SQL_MIN_COLUMN_COUNT, NVL(SQL_MAX_COLUMN_COUNT, 999) AS SQL_MAX_COLUMN_COUNT, SQL_EXAMPLES FROM WWV_FLOW_PLUGINS WHERE FLOW_ID = :B2 AND PLUGIN_TYPE = :B1
Mon Dec 14 14:31:14 2015
Thread 1 advanced to log sequence 233
Current log# 3 seq# 233 mem# 0: /u04/app/oracle/oradata/kcom/redo03.log
Mon Dec 14 14:31:15 2015
Errors in file /u01/app/oracle/diag/rdbms/kcom/Rialto/trace/Rialto_arc0_3947.trc:
ORA-19815: WARNING: db_recovery_file_dest_size of 268435456 bytes is 100.00% used, and has 0 remaining bytes available.
************************************************************************
You have following choices to free up space from flash recovery area:
1. Consider changing RMAN RETENTION POLICY. If you are using Data Guard,
then consider changing RMAN ARCHIVELOG DELETION POLICY.
2. Back up files to tertiary device such as tape using RMAN
BACKUP RECOVERY AREA command.
3. Add disk space and increase db_recovery_file_dest_size parameter to
reflect the new space.
4. Delete unnecessary files using RMAN DELETE command. If an operating
system command was used to delete files, then use RMAN CROSSCHECK and
DELETE EXPIRED commands.
************************************************************************
Mon Dec 14 20:28:23 2015
Thread 1 advanced to log sequence 234
Current log# 4 seq# 234 mem# 0: /u04/app/oracle/oradata/kcom/redo04.log
Mon Dec 14 20:28:24 2015
Errors in file /u01/app/oracle/diag/rdbms/kcom/Rialto/trace/Rialto_arc1_3949.trc:
ORA-19815: WARNING: db_recovery_file_dest_size of 268435456 bytes is 100.00% used, and has 0 remaining bytes available.
************************************************************************
You have following choices to free up space from flash recovery area:
1. Consider changing RMAN RETENTION POLICY. If you are using Data Guard,
then consider changing RMAN ARCHIVELOG DELETION POLICY.
2. Back up files to tertiary device such as tape using RMAN
BACKUP RECOVERY AREA command.
3. Add disk space and increase db_recovery_file_dest_size parameter to
reflect the new space.
4. Delete unnecessary files using RMAN DELETE command. If an operating
system command was used to delete files, then use RMAN CROSSCHECK and
DELETE EXPIRED commands.
************************************************************************
Mon Dec 14 22:00:00 2015
Setting Resource Manager plan SCHEDULER[0x2C09]:DEFAULT_MAINTENANCE_PLAN via scheduler window
Setting Resource Manager plan DEFAULT_MAINTENANCE_PLAN via parameter
Mon Dec 14 22:00:03 2015
Mon Dec 14 22:00:03 2015
Logminer Bld: Lockdown Complete. DB_TXN_SCN is UnwindToSCN (LockdownSCN) is 18957974
Tue Dec 15 02:00:00 2015
Clearing Resource Manager plan via parameter
Tue Dec 15 02:00:02 2015
Simple python 2 parser with hardcoded datetime and input file. Tested with your given log. It has plenty of room for optimization but it works as a start I guess.
#/usr/bin/env python
import re
from datetime import datetime
# year, month, day, hour, minute
filter_from = datetime(2015, 12, 13, 23, 40)
with open("tmp.log") as log:
match = False
for line in log:
if (match):
print line
else:
candidate = re.match(r'[A-Z][a-z][a-z] [A-Z][a-z][a-z] \d\d \d\d:\d\d:\d\d \d\d\d\d', line)
if candidate:
parsed_date = datetime.strptime(candidate.group(0), "%a %b %d %X %Y")
if parsed_date > filter_from:
match = True
print line
I cannot seem to find an answer for this anywhere. Superuser root has a crontab with a couple of jobs that send the resultant output to root's mailbox addressed from my non-superuser account foo.
It is my understanding that the owner of the cron job is supposed to be the sender of the resultant cron job output. Account foo does not have a crontab, and in-fact I have even tried explicitly removing foo's crontab, but still root receives root's cron job output from user foo.
When I edit root's crontab, I log into the system as foo, and then su - to root. Does this have anything to do with it?
When I ls -alF /var/spool/cron/crontabs there is no file for user foo.
Does anyone know why my non-superuser account foo, that does not have a crontab file, seems to be sending mail to superuser root?
It also seems that for some of root's cron jobs, that it executes as root and as foo which both send email to root's mailbox.
Example:
From foo Sat Oct 30 19:01:01 2010
Received: by XXXXXX (8.8.8/1.1.22.3/15Jan03-1152AM)
id TAA0000027883; Sat, 30 Oct 2010 19:01:01 -0400 (EDT)
Date: Sat, 30 Oct 2010 19:01:01 -0400 (EDT)
From: foo
Message-Id: <201010302301.TAA0000027883#XXXXXX>
redacted
Cron: The previous message is the standard output
and standard error of one of your cron commands.
From root Sat Oct 30 19:01:01 2010
Received: by XXXXXX (8.8.8/1.1.22.3/15Jan03-1152AM)
id TAA0000025999; Sat, 30 Oct 2010 19:01:01 -0400 (EDT)
Date: Sat, 30 Oct 2010 19:01:01 -0400 (EDT)
From: system privileged account
Message-Id: <201010302301.TAA0000025999#XXXXXX>
redacted
Cron: The previous message is the standard output
and standard error of one of your cron commands.
You should show us the actual crontab entry. Some crons allow to specify a user, not just a command. If that user doesn't have a mailbox, maybe by default cron sends the output to root's inbox with the sender still set to 'foo' (which is easily done by having From: foo in the mail header.)
vixie-cron supports a system-wide crontab file in /etc/crontab that allows per-user cron jobs to be specified. The syntax is similar to the usual cron syntax except a username is specified in the 6th column, and the command to be run follows that. For example:
0 22 * * 1-5 foo mail -s "Mail to root from foo" root
So check /etc/crontab for any entries with foo in the 6th column.