Jump to content


UnstoppableDrew's Content

There have been 10 items by UnstoppableDrew (Search limited from 25-October 19)


By content type

See this member's

Sort by                Order  

#24640 When's the next MERGE conference?

Posted by UnstoppableDrew on 29 March 2019 - 06:14 PM in General

SSIA. I went to my first one in 2016 and got a lot out of it. Are there plans for another Merge conference any time soon?



#24251 p4ticket as symlink?

Posted by UnstoppableDrew on 17 December 2018 - 10:05 PM in Administration

Just to clarify, are you setting someone's environment variable P4TICKETS=/path/to/ticket_file_symlink ? What's the error when you run a command? I just moved my .p4tickets file to another name, verified I couldn't run a command, then made a symlink called .p4tickets pointing to the original file and I could run commands, so it definitely works with a symlink. If you're using SSL do you also have a .p4trust file in the right place?



#24250 Structured logs location

Posted by UnstoppableDrew on 17 December 2018 - 08:45 PM in Administration

There are 2 features that would dramatically improve structured logs, a second 'archive' path for the rotated logs, and an option to compress on rotation. My company's policy is to maintain 365 days of logs, and we log auth, commands, errors & events. Our log directory currently has 1510 files using a collective 735GB. I would like the option to rotate each log to a different directory and compress the file. That way I keep the current log in the main logs directory, but it's much easier to find, and I still have my year worth of retention, but at significantly less disk usage.



#24249 Helix4Git requirements

Posted by UnstoppableDrew on 17 December 2018 - 07:59 PM in Administration

I'm looking into what it would take to setup Helix4Git at our company, but the admin guide is really vague about a number of things.
  • It's recommended to run the connector on a separate server than the main Helix server. Why?
  • If it has to be a separate server, what are the sizing requirements for it?
  • We have multiple offices that use p4proxies. Do I need to set up a git connector server at each of these locations?
  • The Git users will be a small subset of the total Perforce userbase. Since H4G is a separate license, will those be separate user accounts or can the same user work with both Classic & H4G?
Thanks,



#24027 Forwarding replica or RO + broker?

Posted by UnstoppableDrew on 18 October 2018 - 07:54 PM in Administration

I'm at a remote office that has been using a p4proxy for the local users to connect to. We just set up a full replica server to act as a DR site and I would like to use that instead of the proxy.

My proxy is at ssl:xx.yy.zz.100:1668, the new replica is at ssl:xx.yy.zz.101:1667. I'm wondering if I should run a broker listening on .100:1668 to direct the traffic to the master or the replica, or switch the server to be a forwarding replica. I'd probably still run the broker just so I don't have to change the IP of the replica, but just pass everything along.

Resource usage by one solution or the other is a total non-issue. The box they sent me is so ridiculously over-specced for the job I could probably run a simulation of detonating a nuclear warhead inside a hurricane and not notice a performance hit.



#24016 Cleaning up Diskspace

Posted by UnstoppableDrew on 15 October 2018 - 08:16 PM in Administration

View PostMaffew, on 20 September 2018 - 11:11 AM, said:

Is there a way to list all files on the depot, sorted by file size?

p4 -ztag -F "%fileSize% %depotFile%" sizes  //depot/... | sort -gr



#24015 Jenkins affect on spec depot

Posted by UnstoppableDrew on 15 October 2018 - 07:56 PM in Administration

Edit the spec depot specification, and add exclusion mappings for patterns you don't want revisions for. For example, if all your Jenkins client workspaces are named something like jenkins_project_foo and jenkins_project_bar you can add an entry under SpecMap: "-//spec/client/jenkins_project_*" and it will ignore any client that matches. Jenkins polling shouldn't generate new revisions unless it's deleting & creating a workspace every time. If you let Jenkins manage the workspace, it usually creates a unique name like projectname-1234567 but it will reuse that same name, at least on a given slave. If multiple slaves can build the same project you'll probably get 1 workspace per slave.



#23993 Logins that expire after inactivity instead of 12 hours?

Posted by UnstoppableDrew on 10 October 2018 - 05:59 PM in General

This is admittedly a total hack that will fill your server logs with unnecessary logout commands, but it does accomplish the stated goal. It could be run as a cron job and would need to be run as a user with Perforce superuser level access. How often you run it would depend on how fuzzy the idle timeout is. As written it's a 3-hour window. If you want to be strict, run the cron job every 5 min and deal with the logfile explosion. Or run it every hour with the understanding that the effective idle time is going to be between 3-4 hours. Make it too short and your users will hate you as they have to login several times a day. Note that I'm just echoing the logout command here so I could run it without actually logging everyone out.

#!/bin/bash
now=$(date +"%s")
cutoff=$((now - 3600 * 3))
p4 -ztag -F "%User% %Access%" users | while read line
do
  user=$(echo $line | cut -d " " -f 1)
  access=$(echo $line | cut -d " " -f 2)
  if [[ $access -lt $cutoff ]]; then
	echo "p4 logout -a $user"
  fi
done



#23391 How to use the -x command line argument?

Posted by UnstoppableDrew on 02 May 2018 - 04:10 PM in General

Thanks, guys!

View PostSambwise, on 01 May 2018 - 08:19 PM, said:

p4 -F "label -d %label%" labels -e EXPR | p4 -x - run

I'm always impressed, both here & on Stack Exchange, with the way you combine static text & format strings to form commands for the next stage of a pipeline. I learned about this functionality relatively recently, and it has jumped to the top of my favorite features list for the stuff I do.



#23387 How to use the -x command line argument?

Posted by UnstoppableDrew on 01 May 2018 - 07:40 PM in General

Can someone explain how you're supposed to use the -x flag with the command line client? The help text is really ambiguous and the various things I've tried all haven't worked.
The specific thing I'm trying to do is delete a lot of labels. I figured I could put the list of label names in the file then do 'p4 -x my_labels.txt label -d' but the just gives me a Missing/wrong number of arguments error.